@0xsplits/splits-kit
Version:
UI Components for working with 0xSplits contracts
20 lines (19 loc) • 931 B
TypeScript
/// <reference types="react" />
import { Control, UseFormSetValue, UseFormSetError, FieldValues, Path } from 'react-hook-form';
declare const AddressSelectInput: <FormType extends FieldValues>({ control, inputName, options, emptyText, setValue, setError, validationFunc, validAddressDisplay, clearAddressDefaultValue, isDisabled, supportsEns, }: {
control: Control<FormType>;
inputName: Path<FormType>;
options: {
value: string;
display: () => JSX.Element;
}[];
emptyText: string;
setValue: UseFormSetValue<FormType>;
setError: UseFormSetError<FormType>;
validationFunc: (address: string) => (boolean | string) | Promise<boolean | string>;
validAddressDisplay?: ((address: string) => JSX.Element) | undefined;
clearAddressDefaultValue?: string | undefined;
isDisabled?: boolean | undefined;
supportsEns: boolean;
}) => JSX.Element;
export default AddressSelectInput;