stofli-ui
Version:
Biblioteca moderna de componentes UI para React con Tailwind CSS y Framer Motion
56 lines (53 loc) • 1.58 kB
TypeScript
import React from 'react';
interface DropdownItem {
label: React.ReactNode;
value: string;
icon?: React.ReactNode;
disabled?: boolean;
avatarSrc?: string;
avatarAlt?: string;
description?: string;
}
interface DropdownProps {
items: DropdownItem[];
placeholder?: string;
variant?: "default" | "primary" | "secondary" | "success" | "warning" | "danger";
size?: "sm" | "md" | "lg" | "xl";
radius?: "none" | "sm" | "md" | "full";
disabled?: boolean;
fullWidth?: boolean;
className?: string;
itemClassName?: string;
buttonClassName?: string;
placement?: "bottom" | "top" | "left" | "right";
onChange?: (value: string | string[]) => void;
icon?: React.ReactNode;
showSelectedIcon?: boolean;
defaultValue?: string | string[];
value?: string | string[];
width?: string;
activeColor?: string;
showArrow?: boolean;
multiSelect?: boolean;
avatarSize?: "xs" | "sm" | "md" | "lg";
avatarSrc?: string;
avatarAlt?: string;
selectable?: boolean;
avatarOnly?: boolean;
arrowIconClassName?: string;
dropdownClassName?: string;
listClassName?: string;
itemContentClassName?: string;
itemLabelClassName?: string;
itemIconClassName?: string;
checkIconClassName?: string;
id?: string;
label?: string;
required?: boolean;
"aria-label"?: string;
"aria-describedby"?: string;
errorMessage?: string;
}
declare const Dropdown: React.FC<DropdownProps>;
export { Dropdown as default };
export type { DropdownItem, DropdownProps };