settings-auto-complete.tsx 677 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 SettingsAutoComplete() {
  5. const { t } = useTranslation()
  6. const { autoComplete, setAutoComplete } = useProjectSettingsContext()
  7. return (
  8. <SettingsMenuSelect
  9. onChange={setAutoComplete}
  10. value={autoComplete}
  11. options={[
  12. {
  13. value: true,
  14. label: t('on'),
  15. },
  16. {
  17. value: false,
  18. label: t('off'),
  19. },
  20. ]}
  21. label={t('auto_complete')}
  22. name="autoComplete"
  23. />
  24. )
  25. }