UNPKG

@fluentui/react-northstar

Version:
45 lines (44 loc) 2.35 kB
import * as React from 'react'; import { UIComponentProps } from '../../utils'; import * as PropTypes from 'prop-types'; import { ShorthandValue, FluentComponentStaticProps } from '../../types'; import { Accessibility, StatusBehaviorProps } from '@fluentui/accessibility'; import { AvatarStatusIconProps } from './AvatarStatusIcon'; import { AvatarStatusImageProps } from './AvatarStatusImage'; import { AvatarSizeValue } from './Avatar'; export interface AvatarStatusProps extends UIComponentProps { /** Accessibility behavior if overridden by the user. */ accessibility?: Accessibility<StatusBehaviorProps>; /** A custom color. */ color?: string; /** Shorthand for the icon, to provide customizing status */ icon?: ShorthandValue<AvatarStatusIconProps>; /** Shorthand for the image. */ image?: ShorthandValue<AvatarStatusImageProps>; /** Size multiplier */ size?: AvatarSizeValue; /** The pre-defined state values which can be consumed directly. */ state?: 'success' | 'info' | 'warning' | 'error' | 'unknown'; } export declare type AvatarStatusStylesProps = Required<Pick<AvatarStatusProps, 'color' | 'size' | 'state'>>; export declare const avatarStatusClassName = "ui-status"; /** * A AvatarStatus provides a status for the Avatar. */ export declare const AvatarStatus: (<TExtendedElementType extends React.ElementType<any> = "span">(props: React.RefAttributes<HTMLSpanElement> & Omit<import("@fluentui/react-bindings").PropsOfElement<TExtendedElementType>, "as" | keyof AvatarStatusProps> & { as?: TExtendedElementType; } & AvatarStatusProps) => JSX.Element) & { propTypes?: React.WeakValidationMap<AvatarStatusProps> & { as: React.Requireable<string | ((props: any, context?: any) => any) | (new (props: any, context?: any) => any)>; }; contextTypes?: PropTypes.ValidationMap<any>; defaultProps?: Partial<AvatarStatusProps & { 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 AvatarStatusProps> & { as?: "span"; } & AvatarStatusProps; } & FluentComponentStaticProps<{}>;