import type { InputProps } from '@chakra-ui/react'; import { Input, FormControl, FormLabel, } from '@chakra-ui/react'; import React from 'react'; import type { ControllerRenderProps, FieldError, FieldValues, Path } from 'react-hook-form'; import getPlaceholderWithError from 'lib/getPlaceholderWithError'; import { ADDRESS_LENGTH } from 'lib/validations/address'; type Props> = { field: ControllerRenderProps; size?: InputProps['size']; placeholder?: string; backgroundColor?: string; error?: FieldError; } export default function AddressInput>( { error, field, size, placeholder = 'Address (0x...)', backgroundColor, }: Props) { return ( { getPlaceholderWithError(placeholder, error?.message) } ); }