UNPKG

@primer/react

Version:

An implementation of GitHub's Primer Design System using React

30 lines 1.4 kB
import React from 'react'; import type { SxProp } from '../sx'; import type { ResponsiveValue } from '../hooks/useResponsiveValue'; export declare const DEFAULT_AVATAR_SIZE = 20; export type AvatarProps = { /** Sets the width and height of the avatar. */ size?: number | ResponsiveValue<number>; /** Sets the shape of the avatar to a square if true. If false, the avatar will be circular. */ square?: boolean; /** URL of the avatar image. */ src: string; /** Provide alt text when the Avatar is used without the user's name next to it. */ alt?: string; /** Additional class name. */ className?: string; } & SxProp & React.ComponentPropsWithoutRef<'img'>; declare const Avatar: React.ForwardRefExoticComponent<{ /** Sets the width and height of the avatar. */ size?: number | ResponsiveValue<number>; /** Sets the shape of the avatar to a square if true. If false, the avatar will be circular. */ square?: boolean; /** URL of the avatar image. */ src: string; /** Provide alt text when the Avatar is used without the user's name next to it. */ alt?: string; /** Additional class name. */ className?: string; } & SxProp & Omit<React.DetailedHTMLProps<React.ImgHTMLAttributes<HTMLImageElement>, HTMLImageElement>, "ref"> & React.RefAttributes<HTMLImageElement>>; export default Avatar; //# sourceMappingURL=Avatar.d.ts.map