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
This commit is contained in:
Thaïs
2023-09-04 11:37:31 +02:00
committed by GitHub
parent 2ac32e42c5
commit f29d843db9
14 changed files with 351 additions and 67 deletions

View File

@ -1,14 +1,32 @@
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';
export function BoardOptionsDropdown() {
type BoardOptionsDropdownProps = {
customHotkeyScope: HotkeyScope;
onStageAdd?: (boardColumn: BoardColumnDefinition) => void;
};
export function BoardOptionsDropdown({
customHotkeyScope,
onStageAdd,
}: BoardOptionsDropdownProps) {
return (
<DropdownButton
dropdownKey="options"
buttonComponents={<BoardOptionsDropdownButton />}
dropdownComponents={<BoardOptionsDropdownContent />}
></DropdownButton>
dropdownComponents={
<BoardOptionsDropdownContent
customHotkeyScope={customHotkeyScope}
onStageAdd={onStageAdd}
/>
}
dropdownHotkeyScope={customHotkeyScope}
dropdownKey={BoardOptionsDropdownKey}
/>
);
}