* icons added * recoil family state added for checking compact view in each card * recoil state added for toggle button. Wether compact view show or not * menu item modifed for right side content * compact view toggle added in dropdown options * dropdown width increased because compact view text was overflowing * compact view added in boardcard * new animation added for in and out * compact view enabled state added * old state deleted * sizes added in toggle component * removed extra added code form navigation * toggle size added in menuitem toggle * MenuItemToggle added instead of MenuItemNavigate * Compact view improved
43 lines
1.3 KiB
TypeScript
43 lines
1.3 KiB
TypeScript
import { useResetRecoilState } from 'recoil';
|
|
|
|
import { viewEditModeState } from '@/ui/data/view-bar/states/viewEditModeState';
|
|
|
|
import { Dropdown } from '../../dropdown/components/Dropdown';
|
|
import { DropdownScope } from '../../dropdown/scopes/DropdownScope';
|
|
import { BoardScopeIds } from '../types/enums/BoardScopeIds';
|
|
|
|
import { BoardOptionsDropdownButton } from './BoardOptionsDropdownButton';
|
|
import {
|
|
BoardOptionsDropdownContent,
|
|
BoardOptionsDropdownContentProps,
|
|
} from './BoardOptionsDropdownContent';
|
|
|
|
type BoardOptionsDropdownProps = Pick<
|
|
BoardOptionsDropdownContentProps,
|
|
'customHotkeyScope' | 'onStageAdd'
|
|
>;
|
|
|
|
export const BoardOptionsDropdown = ({
|
|
customHotkeyScope,
|
|
onStageAdd,
|
|
}: BoardOptionsDropdownProps) => {
|
|
const resetViewEditMode = useResetRecoilState(viewEditModeState);
|
|
|
|
return (
|
|
<DropdownScope dropdownScopeId={BoardScopeIds.OptionsDropdown}>
|
|
<Dropdown
|
|
clickableComponent={<BoardOptionsDropdownButton />}
|
|
dropdownComponents={
|
|
<BoardOptionsDropdownContent
|
|
customHotkeyScope={customHotkeyScope}
|
|
onStageAdd={onStageAdd}
|
|
/>
|
|
}
|
|
dropdownHotkeyScope={customHotkeyScope}
|
|
onClickOutside={resetViewEditMode}
|
|
dropdownMenuWidth={170}
|
|
/>
|
|
</DropdownScope>
|
|
);
|
|
};
|