bigbuffet-rw/app/soapbox/features/ui/components/background_shapes.tsx

17 lines
608 B
TypeScript
Raw Normal View History

2022-05-05 19:25:52 -07:00
import classNames from 'classnames';
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' }) => (
<div className={classNames(position, 'top-0 inset-x-0 flex justify-center overflow-hidden pointer-events-none')}>
<div className='w-screen h-screen bg-gradient-sm lg:bg-gradient-light lg:dark:bg-gradient-dark' />
2022-03-21 11:09:01 -07:00
</div>
);
2022-04-26 10:05:49 -07:00
export default BackgroundShapes;