Files
twenty/front/src/modules/ui/board/components/BoardOptionsDropdown.tsx
Thaïs f29d843db9 feat: add board options dropdown and pipeline stage creation (#1399)
* feat: add board options dropdown and pipeline stage creation

Closes #1395

* refactor: code review

- remove useCallback
2023-09-04 11:37:31 +02:00

33 lines
1.0 KiB
TypeScript

import { DropdownButton } from '@/ui/dropdown/components/DropdownButton';
import type { HotkeyScope } from '@/ui/utilities/hotkey/types/HotkeyScope';
import { BoardColumnDefinition } from '../types/BoardColumnDefinition';
import { BoardOptionsDropdownKey } from '../types/BoardOptionsDropdownKey';
import { BoardOptionsDropdownButton } from './BoardOptionsDropdownButton';
import { BoardOptionsDropdownContent } from './BoardOptionsDropdownContent';
type BoardOptionsDropdownProps = {
customHotkeyScope: HotkeyScope;
onStageAdd?: (boardColumn: BoardColumnDefinition) => void;
};
export function BoardOptionsDropdown({
customHotkeyScope,
onStageAdd,
}: BoardOptionsDropdownProps) {
return (
<DropdownButton
buttonComponents={<BoardOptionsDropdownButton />}
dropdownComponents={
<BoardOptionsDropdownContent
customHotkeyScope={customHotkeyScope}
onStageAdd={onStageAdd}
/>
}
dropdownHotkeyScope={customHotkeyScope}
dropdownKey={BoardOptionsDropdownKey}
/>
);
}