import { className } from 'lib/css' import { FC } from 'preact/compat' import Icon from 'ui/components/layout/icon' type TranslationOptionProps = { label?: string checked: boolean description?: string onChange: () => void id?: string itemClassName?: string } const TranslationOption: FC = ({ label, checked, description, onChange, id, itemClassName, }) => { const onKeyDown = (e: KeyboardEvent) => { if (e.code === 'Space' || e.code === 'Enter') { e.preventDefault() onChange() } } return (
  • {label} {description && ({description})}
  • ) } export default TranslationOption