UNPKG

@react95/core

Version:
10 lines (9 loc) 490 B
import React, { forwardRef } from "react"; import { avatar, imgStyle } from "./Avatar.css.mjs"; import { Frame } from "../Frame/Frame.mjs"; const Avatar = forwardRef( ({ src, srcSet, alt, circle, children, size = "48px", ...otherProps }, ref) => /* @__PURE__ */ React.createElement(Frame, { className: avatar({ circle }), ref, ...otherProps, size }, src || srcSet ? /* @__PURE__ */ React.createElement("img", { className: imgStyle, src, srcSet, alt }) : children) ); export { Avatar };