UNPKG

@fluentui/react-northstar

Version:
59 lines (58 loc) 3.06 kB
import * as React from 'react'; import * as PropTypes from 'prop-types'; import { ChildrenComponentProps, ContentComponentProps, UIComponentProps } from '../../utils'; import { FluentComponentStaticProps } from '../../types'; import { Accessibility } from '@fluentui/accessibility'; export interface MenuItemWrapperProps extends UIComponentProps, ContentComponentProps, ChildrenComponentProps { /** * Accessibility behavior if overridden by the user. */ accessibility?: Accessibility<never>; /** A menu item wrapper can be active. */ active?: boolean; /** A menu item wrapper can show it is currently unable to be interacted with. */ disabled?: boolean; /** A menu item wrapper may have just icons. */ iconOnly?: boolean; /** Indicates whether the last event was from keyboard. */ isFromKeyboard?: boolean; /** A menu item wrapper can adjust its appearance to de-emphasize its contents. */ pills?: boolean; /** * A menu can point to show its relationship to nearby content. * For vertical menu, it can point to the start of the item or to the end. */ pointing?: boolean | 'start' | 'end'; /** The menu item wrapper can have primary type. */ primary?: boolean; /** The menu item wrapper can have secondary type. */ secondary?: boolean; /** Menu items wrapper can by highlighted using underline. */ underlined?: boolean; /** A vertical menu displays elements vertically. */ vertical?: boolean; /** Menu can be set to open on hover */ on?: 'hover'; } export declare type MenuItemWrapperStylesProps = Required<Pick<MenuItemWrapperProps, 'active' | 'disabled' | 'iconOnly' | 'isFromKeyboard' | 'pills' | 'pointing' | 'primary' | 'secondary' | 'underlined' | 'vertical' | 'on'>>; export declare const menuItemWrapperClassName = "ui-menu__itemwrapper"; /** * A MenuItemWrapper allows a user to have a dedicated component that can be targeted from the theme. */ export declare const MenuItemWrapper: (<TExtendedElementType extends React.ElementType<any> = "li">(props: React.RefAttributes<HTMLLIElement> & Omit<import("@fluentui/react-bindings").PropsOfElement<TExtendedElementType>, "as" | keyof MenuItemWrapperProps> & { as?: TExtendedElementType; } & MenuItemWrapperProps) => JSX.Element) & { propTypes?: React.WeakValidationMap<MenuItemWrapperProps> & { as: React.Requireable<string | ((props: any, context?: any) => any) | (new (props: any, context?: any) => any)>; }; contextTypes?: PropTypes.ValidationMap<any>; defaultProps?: Partial<MenuItemWrapperProps & { as: "li"; }>; displayName?: string; readonly __PRIVATE_PROPS?: React.RefAttributes<HTMLLIElement> & Omit<Pick<React.DetailedHTMLProps<React.LiHTMLAttributes<HTMLLIElement>, HTMLLIElement>, "key" | keyof React.LiHTMLAttributes<HTMLLIElement>> & { ref?: React.Ref<HTMLLIElement>; }, "as" | keyof MenuItemWrapperProps> & { as?: "li"; } & MenuItemWrapperProps; } & FluentComponentStaticProps<MenuItemWrapperProps>;