UNPKG

@conduction/components

Version:

React (Gatsby) components used within the Conduction Skeleton Application (and its implementations)

30 lines (29 loc) 1.36 kB
/// <reference types="react" /> import { MenuPlacement } from "react-select"; import { Control } from "react-hook-form"; import { IReactHookFormProps } from "../types"; export type TSelectOption = { label: string; value: string; }; export type TGroupedSelectOption = { label: string; options: TSelectOption[]; }; interface ISelectProps { control: Control<any, any>; options: TSelectOption[] | TGroupedSelectOption[]; name: string; ariaLabel: string; id?: string; defaultValue?: any; disabled?: boolean; isClearable?: boolean; hideErrorMessage?: boolean; menuPlacement?: MenuPlacement; placeholder?: string; } export declare const SelectMultiple: ({ id, name, options, errors, control, validation, defaultValue, disabled, hideErrorMessage, menuPlacement, placeholder, ariaLabel, }: ISelectProps & IReactHookFormProps) => JSX.Element; export declare const SelectCreate: ({ id, name, options, errors, control, validation, defaultValue, disabled, hideErrorMessage, menuPlacement, placeholder, ariaLabel, }: ISelectProps & IReactHookFormProps) => JSX.Element; export declare const SelectSingle: ({ id, name, options, errors, control, validation, isClearable, defaultValue, disabled, hideErrorMessage, menuPlacement, placeholder, ariaLabel, }: ISelectProps & IReactHookFormProps) => JSX.Element; export {};