2023-12-18 19:42:27 +03:00
|
|
|
import clsx from 'clsx'
|
|
|
|
|
|
|
|
import { CProps } from '../props'
|
|
|
|
|
|
|
|
interface OverlayProps extends CProps.Styling {
|
2023-12-08 00:33:47 +03:00
|
|
|
id?: string
|
2023-12-05 01:22:44 +03:00
|
|
|
children: React.ReactNode
|
|
|
|
position?: string
|
|
|
|
layer?: string
|
|
|
|
}
|
|
|
|
|
|
|
|
function Overlay({
|
2023-12-18 19:42:27 +03:00
|
|
|
children, className,
|
2023-12-05 01:22:44 +03:00
|
|
|
position='top-0 right-0',
|
2023-12-18 19:42:27 +03:00
|
|
|
layer='z-pop',
|
|
|
|
...restProps
|
2023-12-05 01:22:44 +03:00
|
|
|
}: OverlayProps) {
|
|
|
|
return (
|
|
|
|
<div className='relative'>
|
2023-12-18 19:42:27 +03:00
|
|
|
<div
|
|
|
|
className={clsx(
|
|
|
|
'absolute',
|
|
|
|
className,
|
|
|
|
position,
|
|
|
|
layer
|
|
|
|
)}
|
|
|
|
{...restProps}
|
|
|
|
>
|
2023-12-05 01:22:44 +03:00
|
|
|
{children}
|
|
|
|
</div>
|
|
|
|
</div>);
|
|
|
|
}
|
|
|
|
|
2023-12-15 17:34:50 +03:00
|
|
|
export default Overlay;
|