@0xsplits/splits-kit
Version:
UI Components for working with 0xSplits contracts
20 lines (19 loc) • 954 B
TypeScript
/// <reference types="react" />
import { Control, FieldValues, Path, UseFormSetError, UseFormSetValue } from 'react-hook-form';
declare const AddressInput: <FormType extends FieldValues>({ control, inputName, placeholder, setValue, setError, validationFunc, onClearInput, autoFocus, validAddressDisplay, supportsEns, }: {
control: Control<FormType>;
inputName: Path<FormType>;
placeholder: string;
setValue: UseFormSetValue<FormType>;
setError: UseFormSetError<FormType>;
validationFunc: (address: string) => (boolean | string) | Promise<boolean | string>;
onClearInput?: (() => void) | undefined;
autoFocus?: boolean | undefined;
validAddressDisplay?: ((address: string) => JSX.Element) | undefined;
supportsEns: boolean;
}) => JSX.Element;
export declare const AddressInputMessage: ({ message, isError, }: {
message: string;
isError?: boolean | undefined;
}) => JSX.Element;
export default AddressInput;