* updated DropdownButton props * refactoring in progress * working but layout is wrong * fixed bug * wip on ColumnHeadWithDropdown * fix bug * fix bug * remove unused styled component * fix z-index bug * add an optional argument to DropdownMenu to control the offset of the menu * add an optional argument to DropdownMenu to control the offset of the menu * modify files after PR comments * clean the way the offset is handled * fix lint
24 lines
621 B
TypeScript
24 lines
621 B
TypeScript
import { StyledHeaderDropdownButton } from '@/ui/dropdown/components/StyledHeaderDropdownButton';
|
|
import { useDropdown } from '@/ui/dropdown/hooks/useDropdown';
|
|
|
|
import { BoardOptionsDropdownKey } from '../types/BoardOptionsDropdownKey';
|
|
|
|
export const BoardOptionsDropdownButton = () => {
|
|
const { isDropdownOpen, toggleDropdown } = useDropdown({
|
|
dropdownId: BoardOptionsDropdownKey,
|
|
});
|
|
|
|
const handleClick = () => {
|
|
toggleDropdown();
|
|
};
|
|
|
|
return (
|
|
<StyledHeaderDropdownButton
|
|
isUnfolded={isDropdownOpen}
|
|
onClick={handleClick}
|
|
>
|
|
Options
|
|
</StyledHeaderDropdownButton>
|
|
);
|
|
};
|