react-hook-form-chakra-fields
Version:
A collection of form fields on top of simple and accessible react component library [Chakra UI](https://chakra-ui.com/) and performant form library [React Hook Form](https://react-hook-form.com/), integrated with many other js/ts libraries.
15 lines (14 loc) • 849 B
TypeScript
/// <reference types="react" />
import { NamedProps } from 'react-select';
import { OptionType } from '../../types';
export declare type SelectInputProps = NamedProps<OptionType, boolean> & {
options: OptionType[];
isInvalid?: boolean;
};
declare type Options = OptionType[];
declare const getValue: (value: unknown, isMulti: boolean) => any;
declare const findOptions: (selectedValues: Array<unknown>, options: Options) => Options;
declare const findOption: (selectedValue: unknown, options: Options) => OptionType | null;
declare const getReadValue: (value: unknown, options: Options, isMulti: boolean) => string;
declare const SelectInput: ({ id, isInvalid, isClearable, noOptionsMessage, loadingMessage, ...props }: SelectInputProps) => JSX.Element;
export { SelectInput, getValue, getReadValue, findOption, findOptions };