Files
twenty/front/src/modules/ui/board/components/BoardOptionsDropdown.tsx
2023-09-14 15:06:15 -07:00

36 lines
997 B
TypeScript

import { DropdownButton } from '@/ui/dropdown/components/DropdownButton';
import { BoardOptionsDropdownKey } from '../types/BoardOptionsDropdownKey';
import { BoardOptionsDropdownButton } from './BoardOptionsDropdownButton';
import {
BoardOptionsDropdownContent,
type BoardOptionsDropdownContentProps,
} from './BoardOptionsDropdownContent';
type BoardOptionsDropdownProps = Pick<
BoardOptionsDropdownContentProps,
'customHotkeyScope' | 'onStageAdd' | 'scopeContext'
>;
export function BoardOptionsDropdown({
customHotkeyScope,
onStageAdd,
scopeContext,
}: BoardOptionsDropdownProps) {
return (
<DropdownButton
buttonComponents={<BoardOptionsDropdownButton />}
dropdownComponents={
<BoardOptionsDropdownContent
customHotkeyScope={customHotkeyScope}
onStageAdd={onStageAdd}
scopeContext={scopeContext}
/>
}
dropdownHotkeyScope={customHotkeyScope}
dropdownId={BoardOptionsDropdownKey}
/>
);
}