@fluentui/react-northstar
Version:
A themable React component library.
38 lines (37 loc) • 2.03 kB
TypeScript
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 MenuItemIconProps extends UIComponentProps, ContentComponentProps, ChildrenComponentProps {
/**
* Accessibility behavior if overridden by the user.
*/
accessibility?: Accessibility<never>;
/** Indicates if the parent menu item may have just icons. */
iconOnly?: boolean;
/** Indicates if the parent menu item has content. */
hasContent?: boolean;
}
export declare type MenuItemIconStylesProps = Pick<MenuItemIconProps, 'hasContent' | 'iconOnly'>;
export declare const menuItemIconClassName = "ui-menu__itemicon";
/**
* A MenuItemIcon allows a user to have a dedicated component that can be targeted from the theme.
*/
export declare const MenuItemIcon: (<TExtendedElementType extends React.ElementType<any> = "span">(props: React.RefAttributes<HTMLSpanElement> & Omit<import("@fluentui/react-bindings").PropsOfElement<TExtendedElementType>, "as" | keyof MenuItemIconProps> & {
as?: TExtendedElementType;
} & MenuItemIconProps) => JSX.Element) & {
propTypes?: React.WeakValidationMap<MenuItemIconProps> & {
as: React.Requireable<string | ((props: any, context?: any) => any) | (new (props: any, context?: any) => any)>;
};
contextTypes?: PropTypes.ValidationMap<any>;
defaultProps?: Partial<MenuItemIconProps & {
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 MenuItemIconProps> & {
as?: "span";
} & MenuItemIconProps;
} & FluentComponentStaticProps<MenuItemIconProps>;