Added MobileMenuButton component.
This commit is contained in:
@@ -37,7 +37,7 @@ export function PageHeader({
|
||||
{icon}
|
||||
</Icon>
|
||||
)}
|
||||
{title && <Heading size="4">{title}</Heading>}
|
||||
{title && <Heading size={{ xs: '2', md: '3', lg: '4' }}>{title}</Heading>}
|
||||
</Row>
|
||||
{description && (
|
||||
<Text color="muted" truncate style={{ maxWidth: 600 }} title={description}>
|
||||
|
||||
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>
|
||||
);
|
||||
}
|
||||
Reference in New Issue
Block a user