Refator/sorts dropdown (#1568)

* WIP

* Fixed lint

* Ok for sorts

* Fixed on dropdown toggle

* Fix lint
This commit is contained in:
Lucas Bordeau
2023-09-14 01:38:11 +02:00
committed by GitHub
parent a392a81994
commit 8627416d60
55 changed files with 339 additions and 309 deletions

View File

@ -10,29 +10,23 @@ import { BoardOptionsHotkeyScope } from '../types/BoardOptionsHotkeyScope';
import { BoardOptionsDropdown } from './BoardOptionsDropdown';
export type BoardHeaderProps<SortField> = ComponentProps<'div'> & {
export type BoardHeaderProps = ComponentProps<'div'> & {
onStageAdd?: (boardColumn: BoardColumnDefinition) => void;
} & Pick<
ViewBarProps<SortField>,
| 'availableSorts'
| 'defaultViewName'
| 'onViewsChange'
| 'onViewSubmit'
| 'scopeContext'
ViewBarProps,
'defaultViewName' | 'onViewsChange' | 'onViewSubmit' | 'scopeContext'
>;
export function BoardHeader<SortField>({
export function BoardHeader({
onStageAdd,
onViewsChange,
onViewSubmit,
scopeContext,
availableSorts,
defaultViewName,
}: BoardHeaderProps<SortField>) {
}: BoardHeaderProps) {
return (
<RecoilScope SpecificContext={DropdownRecoilScopeContext}>
<ViewBar
availableSorts={availableSorts}
defaultViewName={defaultViewName}
onViewsChange={onViewsChange}
onViewSubmit={onViewSubmit}