mirror of
https://github.com/umami-software/umami.git
synced 2026-02-05 21:27:20 +01:00
27 lines
873 B
TypeScript
27 lines
873 B
TypeScript
import { Button, Icon, DialogTrigger, Popover, Column, Label } from '@umami/react-zen';
|
|
import { TimezoneSetting } from '@/app/(main)/settings/profile/TimezoneSetting';
|
|
import { DateRangeSetting } from '@/app/(main)/settings/profile/DateRangeSetting';
|
|
import { Gear } from '@/components/icons';
|
|
import { useMessages } from '@/components/hooks';
|
|
|
|
export function SettingsButton() {
|
|
const { formatMessage, labels } = useMessages();
|
|
|
|
return (
|
|
<DialogTrigger>
|
|
<Button variant="quiet">
|
|
<Icon>
|
|
<Gear />
|
|
</Icon>
|
|
</Button>
|
|
<Popover placement="bottom end">
|
|
<Column gap="3">
|
|
<Label>{formatMessage(labels.timezone)}</Label>
|
|
<TimezoneSetting />
|
|
<Label>{formatMessage(labels.defaultDateRange)}</Label>
|
|
<DateRangeSetting />
|
|
</Column>
|
|
</Popover>
|
|
</DialogTrigger>
|
|
);
|
|
}
|