UNPKG

infinity-ui-elements

Version:

A React TypeScript component library with Tailwind CSS design system

107 lines 2.64 kB
import * as React from "react"; import { type DropdownMenuItem } from "./DropdownMenu"; declare const dropdownVariants: (props?: ({ size?: "medium" | "large" | "small" | null | undefined; } & import("class-variance-authority/dist/types").ClassProp) | undefined) => string; export type DropdownItem = DropdownMenuItem; export interface DropdownProps extends Omit<React.HTMLAttributes<HTMLDivElement>, "children"> { /** * Trigger element that opens the dropdown */ trigger?: React.ReactNode; /** * Items to display in the dropdown */ items?: DropdownItem[]; /** * Custom content to render instead of the default item list */ customContent?: React.ReactNode; /** * Section heading text */ sectionHeading?: string; /** * Whether the dropdown is in loading state */ isLoading?: boolean; /** * Whether to show empty/no results state */ isEmpty?: boolean; /** * Empty state title */ emptyTitle?: string; /** * Empty state description */ emptyDescription?: string; /** * Empty state link text */ emptyLinkText?: string; /** * Empty state link click handler */ onEmptyLinkClick?: () => void; /** * Primary button text */ primaryButtonText?: string; /** * Secondary button text */ secondaryButtonText?: string; /** * Primary button click handler */ onPrimaryClick?: () => void; /** * Secondary button click handler */ onSecondaryClick?: () => void; /** * Dropdown size */ size?: "small" | "medium" | "large"; /** * Whether dropdown is open (controlled) */ open?: boolean; /** * Default open state (uncontrolled) */ defaultOpen?: boolean; /** * Callback when open state changes */ onOpenChange?: (open: boolean) => void; /** * Custom class for dropdown container */ containerClassName?: string; /** * Custom class for dropdown menu */ menuClassName?: string; /** * Show chevron on list items */ showChevron?: boolean; /** * Custom empty state icon */ emptyIcon?: React.ReactNode; /** * Disable footer buttons */ disableFooter?: boolean; /** * Whether to show footer actions (overrides disableFooter) */ showFooter?: boolean; } export declare const Dropdown: React.ForwardRefExoticComponent<DropdownProps & React.RefAttributes<HTMLDivElement>>; export { dropdownVariants }; //# sourceMappingURL=Dropdown.d.ts.map