settings-line-height.tsx 816 B

1234567891011121314151617181920212223242526272829303132
  1. import { useTranslation } from 'react-i18next'
  2. import { useProjectSettingsContext } from '../../context/project-settings-context'
  3. import SettingsMenuSelect from './settings-menu-select'
  4. import { LineHeight } from '@/shared/utils/styles'
  5. export default function SettingsLineHeight() {
  6. const { t } = useTranslation()
  7. const { lineHeight, setLineHeight } = useProjectSettingsContext()
  8. return (
  9. <SettingsMenuSelect<LineHeight>
  10. onChange={setLineHeight}
  11. value={lineHeight}
  12. options={[
  13. {
  14. value: 'compact',
  15. label: t('compact'),
  16. },
  17. {
  18. value: 'normal',
  19. label: t('normal'),
  20. },
  21. {
  22. value: 'wide',
  23. label: t('wide'),
  24. },
  25. ]}
  26. label={t('line_height')}
  27. name="lineHeight"
  28. />
  29. )
  30. }