@slashid/react
Version:
React SDK for the /id platform
28 lines • 1.07 kB
TypeScript
import * as Select from "@radix-ui/react-select";
import { ReactNode } from "react";
type Item = {
/** The value of the item. */
value: string;
/** The label of the item, used for display purposes only (the `.textContent` of the `<Select.ItemText>` part). */
label: ReactNode;
/**
* Optional text used for typeahead purposes. By default the typeahead behavior will use the `label` prop.
* Use this when the content is complex, or you have non-textual content inside.
* For example, if you have an icon at the start of the item, you should pass the searchable text value here so that the typeahead behavior can match against it.
*/
textValue?: string;
};
type Props = {
label: string;
className?: string;
type?: "text" | "email" | "tel";
items: Item[];
defaultValue?: string;
placeholder?: string;
onChange: (value: string) => void;
disabled?: boolean;
contentProps?: Select.SelectContentProps;
};
export declare const Dropdown: React.FC<Props>;
export {};
//# sourceMappingURL=index.d.ts.map