Files
explore/toolkit/components/forms/fields/FormFieldNumber.tsx
T
tom goriunovandGitHub cb42262b5e Update UI toolkit (#2741)
* add more form fields and fix link props

* extend select component to render custom item and add lg size to switch

* fix build

* fix button border radius

* fix ts
2025-06-04 14:30:49 +02:00

16 lines
574 B
TypeScript

import React from 'react';
import type { FieldValues } from 'react-hook-form';
import type { FormFieldPropsBase } from './types';
import type { InputProps } from '../../../chakra/input';
import { FormFieldText } from './FormFieldText';
const FormFieldNumberContent = <FormFields extends FieldValues>(
{ inputProps, ...rest }: FormFieldPropsBase<FormFields>,
) => {
return <FormFieldText { ...rest } inputProps={{ type: 'number', ...inputProps } as InputProps}/>;
};
export const FormFieldNumber = React.memo(FormFieldNumberContent) as typeof FormFieldNumberContent;