mirror of
https://github.com/umami-software/umami.git
synced 2026-02-06 21:57:16 +01:00
Added MobileMenuButton component.
This commit is contained in:
parent
d9b08d9491
commit
be5f0494cc
5 changed files with 36 additions and 9 deletions
18
src/components/input/MobileMenuButton.tsx
Normal file
18
src/components/input/MobileMenuButton.tsx
Normal file
|
|
@ -0,0 +1,18 @@
|
|||
import { Button, Icon, DialogTrigger, Dialog, Modal } from '@umami/react-zen';
|
||||
import { Menu } from '@/components/icons';
|
||||
import { ReactNode } from 'react';
|
||||
|
||||
export function MobileMenuButton({ children }: { children: ReactNode }) {
|
||||
return (
|
||||
<DialogTrigger>
|
||||
<Button>
|
||||
<Icon>
|
||||
<Menu />
|
||||
</Icon>
|
||||
</Button>
|
||||
<Modal position="left" offset="20px">
|
||||
<Dialog variant="sheet">{children}</Dialog>
|
||||
</Modal>
|
||||
</DialogTrigger>
|
||||
);
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue