ConceptPortal-public/rsconcept/frontend/src/components/ui/Overlay.tsx

23 lines
514 B
TypeScript
Raw Normal View History

2023-12-28 14:04:44 +03:00
import clsx from 'clsx';
2023-12-28 14:04:44 +03:00
import { CProps } from '../props';
interface OverlayProps extends CProps.Styling {
2023-12-28 14:04:44 +03:00
id?: string;
children: React.ReactNode;
position?: string;
layer?: string;
}
2023-12-28 14:04:44 +03:00
function Overlay({ children, className, position = 'top-0 right-0', layer = 'z-pop', ...restProps }: OverlayProps) {
return (
2023-12-28 14:04:44 +03:00
<div className='relative'>
<div className={clsx('absolute', className, position, layer)} {...restProps}>
{children}
</div>
</div>
);
}
2023-12-28 14:04:44 +03:00
export default Overlay;