UNPKG

@fluentui/react-northstar

Version:
44 lines (43 loc) 2.15 kB
import { Accessibility, StatusBehaviorProps } from '@fluentui/accessibility'; import * as PropTypes from 'prop-types'; import * as React from 'react'; import { UIComponentProps, SizeValue } from '../../utils'; import { ShorthandValue, FluentComponentStaticProps } from '../../types'; import { BoxProps } from '../Box/Box'; export interface StatusProps 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<BoxProps>; /** Size multiplier */ size?: SizeValue; /** The pre-defined state values which can be consumed directly. */ state?: 'success' | 'info' | 'warning' | 'error' | 'unknown'; } export declare type StatusStylesProps = Pick<StatusProps, 'color' | 'size' | 'state'>; export declare const statusClassName = "ui-status"; /** * A Status represents someone's or something's state. * * @accessibility * Implements [ARIA img](https://www.w3.org/TR/wai-aria-1.1/#img) role. */ export declare const Status: (<TExtendedElementType extends React.ElementType<any> = "span">(props: React.RefAttributes<HTMLSpanElement> & Omit<import("@fluentui/react-bindings").PropsOfElement<TExtendedElementType>, "as" | keyof StatusProps> & { as?: TExtendedElementType; } & StatusProps) => JSX.Element) & { propTypes?: React.WeakValidationMap<StatusProps> & { as: React.Requireable<string | ((props: any, context?: any) => any) | (new (props: any, context?: any) => any)>; }; contextTypes?: PropTypes.ValidationMap<any>; defaultProps?: Partial<StatusProps & { 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 StatusProps> & { as?: "span"; } & StatusProps; } & FluentComponentStaticProps<{}>;