Refactor buttons (#1257)

* Refactor buttons

* Complete components creation

* Complete refactoring

* fix lint

* Complete button work
This commit is contained in:
Charles Bochet
2023-08-26 23:59:45 +02:00
committed by GitHub
parent 5d50bbd6a3
commit 1b187350c0
57 changed files with 2209 additions and 859 deletions

View File

@ -1,6 +1,6 @@
import { LightIconButton } from '@/ui/button/components/LightIconButton';
import { IconChevronsRight } from '@/ui/icon/index';
import { IconButton } from '../../button/components/IconButton';
import { useRightDrawer } from '../hooks/useRightDrawer';
export function RightDrawerTopBarCloseButton() {
@ -11,9 +11,11 @@ export function RightDrawerTopBarCloseButton() {
}
return (
<IconButton
icon={<IconChevronsRight size={16} />}
<LightIconButton
icon={<IconChevronsRight />}
onClick={handleButtonClick}
size="medium"
accent="tertiary"
/>
);
}

View File

@ -4,7 +4,8 @@ import {
} from '@tabler/icons-react';
import { useRecoilState } from 'recoil';
import { IconButton } from '../../button/components/IconButton';
import { LightIconButton } from '@/ui/button/components/LightIconButton';
import { isRightDrawerExpandedState } from '../states/isRightDrawerExpandedState';
export function RightDrawerTopBarExpandButton() {
@ -17,12 +18,14 @@ export function RightDrawerTopBarExpandButton() {
}
return (
<IconButton
<LightIconButton
size="medium"
accent="tertiary"
icon={
isRightDrawerExpanded ? (
<IconLayoutSidebarRightCollapse size={16} />
<IconLayoutSidebarRightCollapse />
) : (
<IconLayoutSidebarRightExpand size={16} />
<IconLayoutSidebarRightExpand />
)
}
onClick={handleButtonClick}