bigbuffet-rw/app/soapbox/features/ui/components/background-shapes.tsx

17 lines
590 B
TypeScript
Raw Normal View History

2023-02-06 10:01:03 -08:00
import clsx from 'clsx';
2022-03-21 11:09:01 -07:00
import React from 'react';
2022-05-05 19:25:52 -07:00
interface IBackgroundShapes {
/** Whether the shapes should be absolute positioned or fixed. */
position?: 'fixed' | 'absolute',
}
2022-04-26 10:05:49 -07:00
/** Gradient that appears in the background of the UI. */
2022-05-05 19:25:52 -07:00
const BackgroundShapes: React.FC<IBackgroundShapes> = ({ position = 'fixed' }) => (
2023-02-06 10:06:44 -08:00
<div className={clsx(position, 'pointer-events-none inset-x-0 top-0 flex justify-center overflow-hidden')}>
2023-02-01 14:13:42 -08:00
<div className='bg-gradient-sm lg:bg-gradient-light lg:dark:bg-gradient-dark h-screen w-screen' />
2022-03-21 11:09:01 -07:00
</div>
);
2022-04-26 10:05:49 -07:00
export default BackgroundShapes;