@neuctra/ui
Version:
A modern, responsive, customizable React UI component library powered by Tailwind CSS and Vite.
38 lines (37 loc) • 1.25 kB
TypeScript
import { default as React } from 'react';
export interface DropdownItem {
label?: React.ReactNode;
icon?: React.ReactNode;
onClick?: () => void;
href?: string;
danger?: boolean;
disabled?: boolean;
separator?: boolean;
className?: string;
style?: React.CSSProperties;
}
export interface DropdownProps {
trigger: React.ReactNode;
items: DropdownItem[];
open?: boolean;
onOpenChange?: (open: boolean) => void;
align?: "left" | "right";
width?: number;
closeOnClick?: boolean;
className?: string;
menuClassName?: string;
itemClassName?: string;
/** Applied to the wrapper around the `trigger` node. */
triggerClassName?: string;
/** Applied to the inner `role="menu"` list container. */
menuListClassName?: string;
/** Applied to each separator row (`item.separator`). */
separatorClassName?: string;
/** Applied to an item's leading icon wrapper. */
itemIconClassName?: string;
/** Applied to an item's label text. */
itemLabelClassName?: string;
style?: React.CSSProperties;
menuStyle?: React.CSSProperties;
}
export declare const Dropdown: React.ForwardRefExoticComponent<DropdownProps & React.RefAttributes<HTMLDivElement>>;