@firecms/ui
Version:
Awesome Firebase/Firestore-based headless open-source CMS
42 lines (41 loc) • 1.65 kB
TypeScript
import React, { ChangeEvent } from "react";
export type SelectValue = string | number | boolean;
export type SelectProps<T extends SelectValue = string> = {
open?: boolean;
name?: string;
fullWidth?: boolean;
id?: string;
onOpenChange?: (open: boolean) => void;
value?: T;
className?: string;
inputClassName?: string;
onChange?: React.EventHandler<ChangeEvent<HTMLSelectElement>>;
onValueChange?: (updatedValue: T) => void;
placeholder?: React.ReactNode;
renderValue?: (value: T) => React.ReactNode;
size?: "smallest" | "small" | "medium" | "large";
label?: React.ReactNode | string;
disabled?: boolean;
error?: boolean;
position?: "item-aligned" | "popper";
endAdornment?: React.ReactNode;
inputRef?: React.RefObject<HTMLButtonElement>;
padding?: boolean;
invisible?: boolean;
children?: React.ReactNode;
dataType?: "string" | "number" | "boolean";
};
export declare const Select: React.ForwardRefExoticComponent<SelectProps<string> & React.RefAttributes<HTMLDivElement>>;
export type SelectItemProps<T extends SelectValue = string> = {
value: T;
children?: React.ReactNode;
disabled?: boolean;
className?: string;
};
export declare function SelectItem<T extends SelectValue = string>({ value, children, disabled, className }: SelectItemProps<T>): import("react/jsx-runtime").JSX.Element;
export type SelectGroupProps = {
label: React.ReactNode;
children: React.ReactNode;
className?: string;
};
export declare function SelectGroup({ label, children, className }: SelectGroupProps): import("react/jsx-runtime").JSX.Element;