@tiller-ds/formik-elements
Version:
Formik elements module of Tiller Design System
16 lines (15 loc) • 695 B
TypeScript
/// <reference types="react" />
import { SelectProps } from "@tiller-ds/selectors";
declare type SelectOnlyPropsUnion = "value" | "onChange" | "onBlur" | "error";
export declare type SelectFieldProps<T> = {
/**
* The accessor value for the input field component (for validation, fetching, etc.).
*/
name: string;
/**
* Function describing what property of the object the component will treat as a value.
*/
getOptionValue?: (item: T) => unknown;
} & Omit<SelectProps<T>, SelectOnlyPropsUnion>;
declare function SelectField<T>({ name, getOptionValue, children, options, ...props }: SelectFieldProps<T>): JSX.Element;
export default SelectField;