UNPKG

@fluentui/react-northstar

Version:
42 lines (41 loc) 2.28 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 MenuItemContentProps extends UIComponentProps, ContentComponentProps, ChildrenComponentProps { /** * Accessibility behavior if overridden by the user. */ accessibility?: Accessibility<never>; /** Indicates whether the parent menu item has menu. */ hasMenu?: boolean; /** Indicates whether the parent menu item has icon. */ hasIcon?: boolean; /** Indicates whether the parent menu item is inside vertical menu. */ vertical?: boolean; /** Indicates whether the parent menu item is part of submenu. */ inSubmenu?: boolean; } export declare type MenuItemContentStylesProps = Pick<MenuItemContentProps, 'hasMenu' | 'hasIcon' | 'vertical' | 'inSubmenu'>; export declare const menuItemContentClassName = "ui-menu__itemcontent"; /** * A MenuItemContent allows a user to have a dedicated component that can be targeted from the theme. */ export declare const MenuItemContent: (<TExtendedElementType extends React.ElementType<any> = "span">(props: React.RefAttributes<HTMLSpanElement> & Omit<import("@fluentui/react-bindings").PropsOfElement<TExtendedElementType>, "as" | keyof MenuItemContentProps> & { as?: TExtendedElementType; } & MenuItemContentProps) => JSX.Element) & { propTypes?: React.WeakValidationMap<MenuItemContentProps> & { as: React.Requireable<string | ((props: any, context?: any) => any) | (new (props: any, context?: any) => any)>; }; contextTypes?: PropTypes.ValidationMap<any>; defaultProps?: Partial<MenuItemContentProps & { as: "span"; }>; displayName?: string; readonly __PRIVATE_PROPS?: React.RefAttributes<HTMLSpanElement> & Omit<Pick<React.DetailedHTMLProps<React.HTMLAttributes<HTMLSpanElement>, HTMLSpanElement>, "key" | keyof React.HTMLAttributes<HTMLSpanElement>> & { ref?: React.Ref<HTMLSpanElement>; }, "as" | keyof MenuItemContentProps> & { as?: "span"; } & MenuItemContentProps; } & FluentComponentStaticProps<MenuItemContentProps>;