* Change to using arrow functions Co-authored-by: v1b3m <vibenjamin6@gmail.com> Co-authored-by: Matheus <matheus_benini@hotmail.com> * Add lint rule --------- Co-authored-by: v1b3m <vibenjamin6@gmail.com> Co-authored-by: Matheus <matheus_benini@hotmail.com> Co-authored-by: Charles Bochet <charles@twenty.com>
24 lines
663 B
TypeScript
24 lines
663 B
TypeScript
import { StyledHeaderDropdownButton } from '@/ui/dropdown/components/StyledHeaderDropdownButton';
|
|
import { useDropdownButton } from '@/ui/dropdown/hooks/useDropdownButton';
|
|
|
|
import { BoardOptionsDropdownKey } from '../types/BoardOptionsDropdownKey';
|
|
|
|
export const BoardOptionsDropdownButton = () => {
|
|
const { isDropdownButtonOpen, toggleDropdownButton } = useDropdownButton({
|
|
dropdownId: BoardOptionsDropdownKey,
|
|
});
|
|
|
|
const handleClick = () => {
|
|
toggleDropdownButton();
|
|
};
|
|
|
|
return (
|
|
<StyledHeaderDropdownButton
|
|
isUnfolded={isDropdownButtonOpen}
|
|
onClick={handleClick}
|
|
>
|
|
Options
|
|
</StyledHeaderDropdownButton>
|
|
);
|
|
};
|