UNPKG

@stratakit/react

Version:

A React component library for StrataKit

35 lines (34 loc) 865 B
import { jsx } from "react/jsx-runtime"; import * as React from "react"; import { Avatar as SkAvatar } from "@stratakit/bricks"; import { useCompatProps } from "./~utils.js"; const Avatar = React.forwardRef((props, forwardedRef) => { const { size: sizeProp = "small", abbreviation, title, image, // biome-ignore-start lint/correctness/noUnusedVariables: NOT IMPLEMENTED status, backgroundColor, translatedStatusTitles, // biome-ignore-end lint/correctness/noUnusedVariables: NOT IMPLEMENTED ...rest } = useCompatProps(props); const size = sizeProp === "x-large" ? "xlarge" : sizeProp; return /* @__PURE__ */ jsx( SkAvatar, { ...rest, ref: forwardedRef, initials: abbreviation, alt: title, size, image } ); }); DEV: Avatar.displayName = "Avatar"; export { Avatar };