blob: 25d6f6fe084272389e6d7b94d3819a261e0c8f6f (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
|
import Form from '@components/atoms/forms/form';
import AckeeSelect from '@components/molecules/forms/ackee-select';
import MotionToggle from '@components/molecules/forms/motion-toggle';
import PrismThemeToggle from '@components/molecules/forms/prism-theme-toggle';
import ThemeToggle from '@components/molecules/forms/theme-toggle';
import Modal from '@components/molecules/modals/modal';
import { VFC } from 'react';
import { useIntl } from 'react-intl';
import styles from './settings-modal.module.scss';
export type SettingsModalProps = {
/**
* Set additional classnames to the modal wrapper.
*/
className?: string;
/**
* Set additional classnames to the tooltip wrapper.
*/
tooltipClassName?: string;
};
/**
* SettingsModal component
*
* Render a modal with settings options.
*/
const SettingsModal: VFC<SettingsModalProps> = ({
className = '',
tooltipClassName = '',
}) => {
const intl = useIntl();
const title = intl.formatMessage({
defaultMessage: 'Settings',
description: 'SettingsModal: title',
id: 'gPfT/K',
});
return (
<Modal
title={title}
icon="cogs"
className={`${styles.wrapper} ${className}`}
headingClassName={styles.heading}
>
<Form onSubmit={() => null}>
<ThemeToggle labelClassName={styles.label} value={false} />
<PrismThemeToggle labelClassName={styles.label} value={false} />
<MotionToggle labelClassName={styles.label} value={false} />
<AckeeSelect
initialValue="full"
labelClassName={styles.label}
tooltipClassName={tooltipClassName}
/>
</Form>
</Modal>
);
};
export default SettingsModal;
|