@fluentui/react-northstar
Version:
A themable React component library.
49 lines (48 loc) • 2.17 kB
TypeScript
import * as React from 'react';
import { Accessibility } from '@fluentui/accessibility';
import * as PropTypes from 'prop-types';
import { UIComponentProps, ChildrenComponentProps, ContentComponentProps, SizeValue } from '../../utils';
import { FluentComponentStaticProps, ShorthandValue } from '../../types';
import { PillImageProps } from './PillImage';
export interface PillIconProps extends UIComponentProps, ChildrenComponentProps, ContentComponentProps {
/**
* Accessibility behavior if overridden by the user.
*/
accessibility?: Accessibility<never>;
/**
* A Pill Icon can be sized.
*/
size?: Extract<SizeValue, 'smaller' | 'small' | 'medium'>;
/**
* A Pill Icon can represent selection state
*/
selectable?: boolean;
/**
* A PillImage shorthand for the image slot.
*/
image?: ShorthandValue<PillImageProps>;
}
export declare type PillIconStylesProps = Required<Pick<PillIconProps, 'size' | 'selectable'>> & {
hasImage: boolean;
};
export declare const pillIconClassName = "ui-pill__icon";
/**
* A PillIcon allows user set an icon.
*/
export declare const PillIcon: (<TExtendedElementType extends React.ElementType<any> = "span">(props: React.RefAttributes<HTMLSpanElement> & Omit<import("@fluentui/react-bindings").PropsOfElement<TExtendedElementType>, "as" | keyof PillIconProps> & {
as?: TExtendedElementType;
} & PillIconProps) => JSX.Element) & {
propTypes?: React.WeakValidationMap<PillIconProps> & {
as: React.Requireable<string | ((props: any, context?: any) => any) | (new (props: any, context?: any) => any)>;
};
contextTypes?: PropTypes.ValidationMap<any>;
defaultProps?: Partial<PillIconProps & {
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 PillIconProps> & {
as?: "span";
} & PillIconProps;
} & FluentComponentStaticProps<PillIconProps>;