@primer/react
Version:
An implementation of GitHub's Primer Design System using React
20 lines (19 loc) • 1.26 kB
TypeScript
import { ResponsiveValue } from "../hooks/useResponsiveValue.js";
import React from "react";
//#region src/Avatar/Avatar.d.ts
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;
} & 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;
} & Omit<React.DetailedHTMLProps<React.ImgHTMLAttributes<HTMLImageElement>, HTMLImageElement>, "ref"> & React.RefAttributes<HTMLImageElement>>;
//#endregion
export { AvatarProps, Avatar as default };