aboutsummaryrefslogtreecommitdiffstats
path: root/src/components/organisms/toolbar/settings.tsx
diff options
context:
space:
mode:
Diffstat (limited to 'src/components/organisms/toolbar/settings.tsx')
-rw-r--r--src/components/organisms/toolbar/settings.tsx62
1 files changed, 0 insertions, 62 deletions
diff --git a/src/components/organisms/toolbar/settings.tsx b/src/components/organisms/toolbar/settings.tsx
deleted file mode 100644
index a0aad8c..0000000
--- a/src/components/organisms/toolbar/settings.tsx
+++ /dev/null
@@ -1,62 +0,0 @@
-import { forwardRef, type ForwardRefRenderFunction } from 'react';
-import { useIntl } from 'react-intl';
-import { BooleanField, type BooleanFieldProps, Icon } from '../../atoms';
-import { FlippingLabel } from '../../molecules';
-import { SettingsModal, type SettingsModalProps } from '../modals';
-import styles from './settings.module.scss';
-import sharedStyles from './toolbar-items.module.scss';
-
-export type SettingsProps = SettingsModalProps & {
- /**
- * The button state.
- */
- isActive: BooleanFieldProps['isChecked'];
- /**
- * A callback function to handle button state.
- */
- setIsActive: BooleanFieldProps['onChange'];
-};
-
-const SettingsWithRef: ForwardRefRenderFunction<
- HTMLDivElement,
- SettingsProps
-> = ({ className = '', isActive = false, setIsActive }, ref) => {
- const intl = useIntl();
- const label = isActive
- ? intl.formatMessage({
- defaultMessage: 'Close settings',
- id: '+viX9b',
- description: 'Settings: Close label',
- })
- : intl.formatMessage({
- defaultMessage: 'Open settings',
- id: 'QCW3cy',
- description: 'Settings: Open label',
- });
-
- return (
- <div className={sharedStyles.item} ref={ref}>
- <BooleanField
- className={sharedStyles.checkbox}
- id="settings-button"
- isChecked={isActive}
- name="settings-button"
- onChange={setIsActive}
- type="checkbox"
- value="open"
- />
- <FlippingLabel
- className={sharedStyles.label}
- htmlFor="settings-button"
- icon={<Icon aria-hidden={true} shape="cog" size="lg" />}
- isActive={isActive}
- label={label}
- />
- <SettingsModal
- className={`${sharedStyles.modal} ${styles.modal} ${className}`}
- />
- </div>
- );
-};
-
-export const Settings = forwardRef(SettingsWithRef);