UNPKG

react-govuk-autocomplete

Version:

A React GOV.UK auto complete component for government platforms and services.

26 lines (25 loc) 964 B
import { GroupBase, SingleValue, SelectInstance } from "react-select"; import { LabelValuePair } from "../interfaces"; import "./AutoComplete.scss"; interface AutoCompleteProps { identifier: string; label: string; hint?: string; error?: string; isLoading?: boolean; isDisabled?: boolean; multiQuestion?: boolean; placeholder?: string; required?: boolean; allowCreate?: boolean; formatCreateLabel?: (label: string) => string; useUpperCase?: boolean; containerClassExt?: string; labelClassExt?: string; errorClassExt?: string; options: LabelValuePair[]; value: SingleValue<LabelValuePair> | undefined; onChange: (value: SingleValue<LabelValuePair>, isNew: boolean) => void; } export declare const AutoComplete: import("react").ForwardRefExoticComponent<AutoCompleteProps & import("react").RefAttributes<SelectInstance<LabelValuePair, false, GroupBase<LabelValuePair>> | undefined>>; export {};