UNPKG

liber-salti

Version:

Saltí - Liber Design System

55 lines (54 loc) 1.38 kB
/// <reference types="react" /> import { IconName } from '../Icon/Icon.types'; import { TooltipProps } from '../Tooltip/Tooltip.types'; export declare type MenuItemVariant = 'default' | 'chip' | 'checkbox' | 'icon'; export interface MenuItemProps { /** * Text for the ARIA screen reader. */ ariaLabel?: string; /** * The content of the label */ children: React.ReactNode; /** * The variant of the component. */ variant?: MenuItemVariant; /** * The value of the item. */ value?: number | string; /** * The name of the icon, if variant is icon. */ iconName?: IconName; /** * The onClick action. */ onClick?: React.MouseEventHandler<HTMLElement> & ((args: any) => any); /** * Wether the item is selected or not. */ selected?: boolean; /** * Wether the item is disabled or not. */ disabled?: boolean; /** * Href for the anchor element if its meant to be a link */ href?: string; /** * Overrides the current tooltip text */ tooltip?: string; /** * Overrides the default tooltip placement */ tooltipPlacement?: TooltipProps['placement']; /** * The element to be used as root node */ component?: React.ElementType; }