@educrib/firefly
Version:
UI design system for Educrib Ecosystem
26 lines (22 loc) • 617 B
text/typescript
// Type for Direction
export type Direction = "horizontal" | "vertical";
export type TOption = {
label: string;
value: string;
};
export type searchFn = (_: string) => Promise<TOption[] | any[] | undefined | null>;
export type callback = (_: TOption[]) => void;
export type AutoCompleteProps = {
defaultValue?: TOption | TOption[] | undefined;
searchFn: searchFn;
limit?: number;
name: string;
placeholder: string;
slugAsValue?: boolean;
acceptMultiple?: boolean;
readOnly?: boolean;
className?: string;
value?: string | TOption;
onChange?: (_: TOption) => void;
required?: boolean;
};