2023-04-01 04:31:58 +00:00
|
|
|
import { Button, Icon, PopupTrigger, Popup, Form, FormRow } from 'react-basics';
|
2023-10-03 23:05:17 +00:00
|
|
|
import TimezoneSetting from 'app/(main)/settings/profile/TimezoneSetting';
|
|
|
|
|
import DateRangeSetting from 'app/(main)/settings/profile/DateRangeSetting';
|
2023-03-03 20:37:26 +00:00
|
|
|
import Icons from 'components/icons';
|
2023-08-21 09:06:09 +00:00
|
|
|
import useMessages from 'components/hooks/useMessages';
|
2022-11-10 12:47:02 +00:00
|
|
|
import styles from './SettingsButton.module.css';
|
|
|
|
|
|
2023-04-21 15:00:42 +00:00
|
|
|
export function SettingsButton() {
|
2023-03-22 21:05:55 +00:00
|
|
|
const { formatMessage, labels } = useMessages();
|
2022-11-10 12:47:02 +00:00
|
|
|
|
|
|
|
|
return (
|
2023-03-03 20:37:26 +00:00
|
|
|
<PopupTrigger>
|
2023-04-01 04:31:58 +00:00
|
|
|
<Button variant="quiet">
|
|
|
|
|
<Icon>
|
|
|
|
|
<Icons.Gear />
|
|
|
|
|
</Icon>
|
|
|
|
|
</Button>
|
2023-12-09 06:14:55 +00:00
|
|
|
<Popup className={styles.popup} position="bottom" alignment="end">
|
2023-03-03 20:37:26 +00:00
|
|
|
<Form>
|
|
|
|
|
<FormRow label={formatMessage(labels.timezone)}>
|
2022-11-10 12:47:02 +00:00
|
|
|
<TimezoneSetting />
|
2023-03-03 20:37:26 +00:00
|
|
|
</FormRow>
|
|
|
|
|
<FormRow label={formatMessage(labels.defaultDateRange)}>
|
2022-11-10 12:47:02 +00:00
|
|
|
<DateRangeSetting />
|
2023-03-03 20:37:26 +00:00
|
|
|
</FormRow>
|
|
|
|
|
</Form>
|
|
|
|
|
</Popup>
|
|
|
|
|
</PopupTrigger>
|
2022-11-10 12:47:02 +00:00
|
|
|
);
|
|
|
|
|
}
|
2023-04-21 15:00:42 +00:00
|
|
|
|
|
|
|
|
export default SettingsButton;
|