line-height-setting.tsx 770 B

12345678910111213141516171819202122232425262728293031
  1. import { useProjectSettingsContext } from '@/features/editor-left-menu/context/project-settings-context'
  2. import { useTranslation } from 'react-i18next'
  3. import DropdownSetting from '../dropdown-setting'
  4. export default function LineHeightSetting() {
  5. const { lineHeight, setLineHeight } = useProjectSettingsContext()
  6. const { t } = useTranslation()
  7. return (
  8. <DropdownSetting
  9. id="lineHeight"
  10. label={t('editor_line_height')}
  11. options={[
  12. {
  13. value: 'compact',
  14. label: t('compact'),
  15. },
  16. {
  17. value: 'normal',
  18. label: t('normal'),
  19. },
  20. {
  21. value: 'wide',
  22. label: t('wide'),
  23. },
  24. ]}
  25. onChange={setLineHeight}
  26. value={lineHeight}
  27. />
  28. )
  29. }