mirror of
https://github.com/umami-software/umami.git
synced 2026-02-11 08:07:12 +01:00
Moved collapse button.
This commit is contained in:
parent
5d2c1e27c2
commit
adca3c36d0
7 changed files with 1883 additions and 37 deletions
36
src/app/(main)/MenuBar.tsx
Normal file
36
src/app/(main)/MenuBar.tsx
Normal file
|
|
@ -0,0 +1,36 @@
|
|||
import { ThemeButton, Row, Button, Icon } from '@umami/react-zen';
|
||||
import { LanguageButton } from '@/components/input/LanguageButton';
|
||||
import { ProfileButton } from '@/components/input/ProfileButton';
|
||||
import { TeamsButton } from '@/components/input/TeamsButton';
|
||||
import type { RowProps } from '@umami/react-zen/Row';
|
||||
import useGlobalState from '@/components/hooks/useGlobalState';
|
||||
import { Lucide } from '@/components/icons';
|
||||
|
||||
export function MenuBar(props: RowProps) {
|
||||
const [isCollapsed, setCollapsed] = useGlobalState('sidenav-collapsed');
|
||||
|
||||
return (
|
||||
<Row
|
||||
{...props}
|
||||
justifyContent="space-between"
|
||||
alignItems="center"
|
||||
paddingY="3"
|
||||
paddingX="3"
|
||||
paddingRight="5"
|
||||
>
|
||||
<Row>
|
||||
<Button onPress={() => setCollapsed(!isCollapsed)} variant="quiet">
|
||||
<Icon>
|
||||
<Lucide.PanelLeft />
|
||||
</Icon>
|
||||
</Button>
|
||||
<TeamsButton />
|
||||
</Row>
|
||||
<Row justifyContent="flex-end">
|
||||
<ThemeButton />
|
||||
<LanguageButton />
|
||||
<ProfileButton />
|
||||
</Row>
|
||||
</Row>
|
||||
);
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue