2023-07-20 17:11:03 +03:00
|
|
|
interface DropdownProps {
|
|
|
|
children: React.ReactNode
|
|
|
|
stretchLeft?: boolean
|
2023-09-15 23:29:52 +03:00
|
|
|
dimensions?: string
|
2023-07-20 17:11:03 +03:00
|
|
|
}
|
|
|
|
|
2023-09-15 23:29:52 +03:00
|
|
|
function Dropdown({ children, dimensions = 'w-fit', stretchLeft }: DropdownProps) {
|
2023-07-20 17:11:03 +03:00
|
|
|
return (
|
2023-12-04 14:19:54 +03:00
|
|
|
<div className='relative text-sm'>
|
|
|
|
<div className={`absolute ${stretchLeft ? 'right-0' : 'left-0'} mt-3 z-modal-tooltip flex flex-col items-stretch justify-start origin-top-right border rounded-md shadow-lg clr-input ${dimensions}`}>
|
|
|
|
{children}
|
|
|
|
</div>
|
|
|
|
</div>
|
2023-07-20 17:11:03 +03:00
|
|
|
);
|
|
|
|
}
|
|
|
|
|
2023-07-25 20:27:29 +03:00
|
|
|
export default Dropdown;
|