mirror of
https://github.com/luxfi/explore.git
synced 2026-09-24 00:28:18 +00:00
16 lines
568 B
TypeScript
16 lines
568 B
TypeScript
import React from 'react';
|
|
import type { FieldValues } from 'react-hook-form';
|
|
|
|
import type { FormFieldPropsBase } from './types';
|
|
|
|
import type { InputProps } from '@luxfi/ui/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;
|