mirror of
https://github.com/kremalicious/umami.git
synced 2024-11-15 09:45:04 +01:00
34 lines
1.1 KiB
JavaScript
34 lines
1.1 KiB
JavaScript
import { useIntl } from 'react-intl';
|
|
import { Button, Icon, Tooltip, PopupTrigger, Popup, Form, FormRow } from 'react-basics';
|
|
import TimezoneSetting from 'components/pages/settings/profile/TimezoneSetting';
|
|
import DateRangeSetting from 'components/pages/settings/profile/DateRangeSetting';
|
|
import Icons from 'components/icons';
|
|
import { labels } from 'components/messages';
|
|
import styles from './SettingsButton.module.css';
|
|
|
|
export default function SettingsButton() {
|
|
const { formatMessage } = useIntl();
|
|
|
|
return (
|
|
<PopupTrigger>
|
|
<Tooltip label={formatMessage(labels.settings)} position="bottom">
|
|
<Button variant="quiet">
|
|
<Icon>
|
|
<Icons.Gear />
|
|
</Icon>
|
|
</Button>
|
|
</Tooltip>
|
|
<Popup className={styles.popup} position="bottom" alignment="end">
|
|
<Form>
|
|
<FormRow label={formatMessage(labels.timezone)}>
|
|
<TimezoneSetting />
|
|
</FormRow>
|
|
<FormRow label={formatMessage(labels.defaultDateRange)}>
|
|
<DateRangeSetting />
|
|
</FormRow>
|
|
</Form>
|
|
</Popup>
|
|
</PopupTrigger>
|
|
);
|
|
}
|