diff options
| author | Armand Philippot <git@armandphilippot.com> | 2022-05-18 22:40:59 +0200 |
|---|---|---|
| committer | Armand Philippot <git@armandphilippot.com> | 2022-05-18 22:40:59 +0200 |
| commit | 584bd42f871d2e1618ca414749f09c38f0143a44 (patch) | |
| tree | 45c821eec2ad9c77d5bccf83057cfc0a7e22ba09 /src/components/organisms/toolbar/settings.tsx | |
| parent | b214baab3e17d92f784b4f782863deafc5558ee4 (diff) | |
chore: handle settings change
Diffstat (limited to 'src/components/organisms/toolbar/settings.tsx')
| -rw-r--r-- | src/components/organisms/toolbar/settings.tsx | 22 |
1 files changed, 15 insertions, 7 deletions
diff --git a/src/components/organisms/toolbar/settings.tsx b/src/components/organisms/toolbar/settings.tsx index 43d3190..9985ba0 100644 --- a/src/components/organisms/toolbar/settings.tsx +++ b/src/components/organisms/toolbar/settings.tsx @@ -1,7 +1,7 @@ import Checkbox, { type CheckboxProps } from '@components/atoms/forms/checkbox'; import Label from '@components/atoms/forms/label'; import Cog from '@components/atoms/icons/cog'; -import { FC, forwardRef, ForwardRefRenderFunction } from 'react'; +import { forwardRef, ForwardRefRenderFunction } from 'react'; import { useIntl } from 'react-intl'; import SettingsModal, { type SettingsModalProps, @@ -9,7 +9,10 @@ import SettingsModal, { import settingsStyles from './settings.module.scss'; import sharedStyles from './toolbar-items.module.scss'; -export type SettingsProps = { +export type SettingsProps = Pick< + SettingsModalProps, + 'ackeeStorageKey' | 'motionStorageKey' | 'tooltipClassName' +> & { /** * Set additional classnames to the modal wrapper. */ @@ -22,14 +25,17 @@ export type SettingsProps = { * A callback function to handle button state. */ setIsActive: CheckboxProps['setValue']; - /** - * Set additional classnames to the tooltip wrapper. - */ - tooltipClassName?: SettingsModalProps['tooltipClassName']; }; const Settings: ForwardRefRenderFunction<HTMLDivElement, SettingsProps> = ( - { className = '', isActive, setIsActive, tooltipClassName = '' }, + { + ackeeStorageKey, + className = '', + isActive, + motionStorageKey, + setIsActive, + tooltipClassName = '', + }, ref ) => { const intl = useIntl(); @@ -62,7 +68,9 @@ const Settings: ForwardRefRenderFunction<HTMLDivElement, SettingsProps> = ( <Cog /> </Label> <SettingsModal + ackeeStorageKey={ackeeStorageKey} className={`${sharedStyles.modal} ${settingsStyles.modal} ${className}`} + motionStorageKey={motionStorageKey} tooltipClassName={tooltipClassName} /> </div> |
