blob: 500c40c4f3f3efac8535237f0059544c9cb03d83 (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
|
import { Button, type ButtonProps, Icon } from '@umami/react-zen';
import { useGlobalState } from '@/components/hooks';
import { PanelLeft } from '@/components/icons';
export function PanelButton(props: ButtonProps) {
const [isCollapsed, setIsCollapsed] = useGlobalState('sidenav-collapsed');
return (
<Button
onPress={() => setIsCollapsed(!isCollapsed)}
variant="zero"
{...props}
style={{ padding: 0 }}
>
<Icon strokeColor="muted">
<PanelLeft />
</Icon>
</Button>
);
}
|