This PR was created by [GitStart](https://gitstart.com/) to address the requirements from this ticket: [TWNTY-7529](https://clients.gitstart.com/twenty/5449/tickets/TWNTY-7529). --- ### Description - Migrated all button components to `twenty-ui` \ \ `Button`\ `ButtonGroup`\ `ColorPickerButton`\ `FloatingButton`\ `FloatingButtonGroup`\ `FloatingIconButton`\ `FloatingIconButtonGroup`\ `IconButton`\ `IconButtonGroup`\ `LightButton`\ `LightIconButton`\ `LightIconButtonGroup`\ `MainButton`\ \ Fixes twentyhq/private-issues#89 Co-authored-by: gitstart-twenty <gitstart-twenty@users.noreply.github.com> Co-authored-by: Charles Bochet <charles@twenty.com>
22 lines
561 B
TypeScript
22 lines
561 B
TypeScript
import { IconMinus, LightIconButton } from 'twenty-ui';
|
|
|
|
import { useRightDrawer } from '@/ui/layout/right-drawer/hooks/useRightDrawer';
|
|
|
|
export const RightDrawerTopBarMinimizeButton = () => {
|
|
const { isRightDrawerMinimized, minimizeRightDrawer, maximizeRightDrawer } =
|
|
useRightDrawer();
|
|
|
|
const handleButtonClick = () => {
|
|
isRightDrawerMinimized ? maximizeRightDrawer() : minimizeRightDrawer();
|
|
};
|
|
|
|
return (
|
|
<LightIconButton
|
|
Icon={IconMinus}
|
|
onClick={handleButtonClick}
|
|
size="medium"
|
|
accent="tertiary"
|
|
/>
|
|
);
|
|
};
|