@fluentui/react-northstar
Version:
A themable React component library.
46 lines (45 loc) • 2.32 kB
TypeScript
import { Accessibility, AccessibilityAttributes, ImageBehaviorProps } from '@fluentui/accessibility';
import * as PropTypes from 'prop-types';
import * as React from 'react';
import { UIComponentProps } from '../../utils';
import { FluentComponentStaticProps } from '../../types';
import { AvatarSizeValue } from './Avatar';
export interface AvatarImageProps extends UIComponentProps, ImageBehaviorProps {
/** Alternative text. */
alt?: string;
'aria-label'?: AccessibilityAttributes['aria-label'];
/** Accessibility behavior if overridden by the user. */
accessibility?: Accessibility<ImageBehaviorProps>;
/** @deprecated An image may be formatted to appear inline with text as an avatar. */
avatar?: boolean;
/** An Avatarimage can appear circular. */
circular?: boolean;
/** An Avatarimage can take up the width of its container. */
fluid?: boolean;
/** AvatarImage source URL. */
src?: string;
/** Size multiplier. */
size?: AvatarSizeValue;
}
export declare type AvatarImageStylesProps = Pick<AvatarImageProps, 'avatar' | 'circular' | 'fluid' | 'size'>;
export declare const avatarImageClassName = "ui-image";
/**
* An AvatarImage is a graphic representation used by Avatar.
*/
export declare const AvatarImage: (<TExtendedElementType extends React.ElementType<any> = "img">(props: React.RefAttributes<HTMLImageElement> & Omit<import("@fluentui/react-bindings").PropsOfElement<TExtendedElementType>, "as" | keyof AvatarImageProps> & {
as?: TExtendedElementType;
} & AvatarImageProps) => JSX.Element) & {
propTypes?: React.WeakValidationMap<AvatarImageProps> & {
as: React.Requireable<string | ((props: any, context?: any) => any) | (new (props: any, context?: any) => any)>;
};
contextTypes?: PropTypes.ValidationMap<any>;
defaultProps?: Partial<AvatarImageProps & {
as: "img";
}>;
displayName?: string;
readonly __PRIVATE_PROPS?: React.RefAttributes<HTMLImageElement> & Omit<Pick<React.DetailedHTMLProps<React.ImgHTMLAttributes<HTMLImageElement>, HTMLImageElement>, "key" | keyof React.ImgHTMLAttributes<HTMLImageElement>> & {
ref?: React.Ref<HTMLImageElement>;
}, "as" | keyof AvatarImageProps> & {
as?: "img";
} & AvatarImageProps;
} & FluentComponentStaticProps<AvatarImageProps>;