settings-math-preview.tsx 674 B

123456789101112131415161718192021222324252627
  1. import { useTranslation } from 'react-i18next'
  2. import { useProjectSettingsContext } from '../../context/project-settings-context'
  3. import SettingsMenuSelect from './settings-menu-select'
  4. export default function SettingsMathPreview() {
  5. const { t } = useTranslation()
  6. const { mathPreview, setMathPreview } = useProjectSettingsContext()
  7. return (
  8. <SettingsMenuSelect
  9. onChange={setMathPreview}
  10. value={mathPreview}
  11. options={[
  12. {
  13. value: true,
  14. label: t('on'),
  15. },
  16. {
  17. value: false,
  18. label: t('off'),
  19. },
  20. ]}
  21. label={t('equation_preview')}
  22. name="mathPreview"
  23. />
  24. )
  25. }