@sikka/hawa
Version:
Modern UI Kit made with Tailwind
45 lines (41 loc) • 1.3 kB
TypeScript
import * as React from 'react';
import { P as PositionType, D as DirectionType, C as CommandInputProps } from '../index-B0aJcA6d.js';
import '@radix-ui/react-dialog';
import 'cmdk';
type LabelProps = {
hint?: React.ReactNode;
hintSide?: PositionType;
htmlFor?: string;
required?: boolean;
};
type ComboboxTypes<T> = {
labelKey?: keyof T | any;
valueKey?: keyof T | any;
data: T[];
width?: string;
texts?: {
noItems?: string;
placeholder?: string;
searchPlaceholder?: string;
};
isLoading?: boolean;
helperText?: any;
popoverClassName?: string;
/** This the same value as the one with the key valueKey */
defaultValue?: string;
preview?: boolean;
hideInput?: boolean;
direction?: DirectionType;
inputProps?: CommandInputProps;
id?: string;
/** The label of the input field */
label?: any;
labelProps?: LabelProps;
/** If true, it will show a red asterisk next to the label*/
isRequired?: boolean;
onChange?: (e: any) => void;
renderOption?: (item: T) => React.ReactNode;
renderSelected?: (item: T) => React.ReactNode;
};
declare const Combobox: React.ForwardRefExoticComponent<ComboboxTypes<any> & React.RefAttributes<HTMLDivElement>>;
export { Combobox };