import { useCallback, type FC, type FormEvent } from 'react'; import { useIntl } from 'react-intl'; import { Form, Heading, Icon, Modal, type ModalProps } from '../../atoms'; import { AckeeToggle, type AckeeToggleProps, MotionToggle, type MotionToggleProps, PrismThemeToggle, ThemeToggle, } from '../forms'; import styles from './settings-modal.module.scss'; export type SettingsModalProps = Pick & { /** * The local storage key for Ackee settings. */ ackeeStorageKey: AckeeToggleProps['storageKey']; /** * The local storage key for Reduce motion settings. */ motionStorageKey: MotionToggleProps['storageKey']; }; /** * SettingsModal component * * Render a modal with settings options. */ export const SettingsModal: FC = ({ className = '', ackeeStorageKey, motionStorageKey, }) => { const intl = useIntl(); const title = intl.formatMessage({ defaultMessage: 'Settings', description: 'SettingsModal: title', id: 'gPfT/K', }); const ariaLabel = intl.formatMessage({ defaultMessage: 'Settings form', id: 'xYNeKX', description: 'SettingsModal: an accessible form name', }); const submitHandler = useCallback((e: FormEvent) => { e.preventDefault(); }, []); return ( {title} } >
); };