import { Field as ChakraField } from '@chakra-ui/react'; import * as React from 'react'; export interface FieldProps extends Omit { label?: React.ReactNode; helperText?: React.ReactNode; errorText?: React.ReactNode; optionalText?: React.ReactNode; type?: 'text' | 'password'; } export const Field = React.forwardRef(function Field(props, ref) { const { label, children, helperText, errorText, optionalText, ...rest } = props; return ( {label && ( {label} )} {children} {helperText && {helperText}} {errorText && {errorText}} ); });