mirror of
https://gitlab.com/mbugroup/lti-web-client.git
synced 2026-05-20 05:22:02 +00:00
chore: create RowOptionsMenuWrapper component
This commit is contained in:
@@ -0,0 +1,29 @@
|
||||
import { ReactNode } from 'react';
|
||||
import { cn } from '@/lib/helper';
|
||||
|
||||
interface RowOptionsMenuWrapperProps {
|
||||
children?: ReactNode;
|
||||
type: 'dropdown' | 'collapse';
|
||||
}
|
||||
|
||||
const RowOptionsMenuWrapper = ({
|
||||
children,
|
||||
type,
|
||||
}: RowOptionsMenuWrapperProps) => {
|
||||
return (
|
||||
<div
|
||||
tabIndex={type === 'dropdown' ? 0 : undefined}
|
||||
className={cn(
|
||||
{
|
||||
'dropdown-content mr-2': type === 'dropdown',
|
||||
'w-fit ml-auto mt-2': type === 'collapse',
|
||||
},
|
||||
'p-2.5 bg-base-100 rounded-box z-10 border border-black/10 shadow'
|
||||
)}
|
||||
>
|
||||
<div className='flex flex-col gap-1'>{children}</div>
|
||||
</div>
|
||||
);
|
||||
};
|
||||
|
||||
export default RowOptionsMenuWrapper;
|
||||
Reference in New Issue
Block a user