UNPKG

@payfit/unity-components

Version:

39 lines (38 loc) 924 B
import { AvatarProvider as e } from "./Avatar.context.js"; import { avatarBase as t } from "./Avatar.variants.js"; import * as n from "react"; import { uyTv as r } from "@payfit/unity-themes"; import { jsx as i } from "react/jsx-runtime"; import * as a from "@radix-ui/react-avatar"; //#region src/components/avatar/Avatar.tsx var o = r({ extend: t, base: "uy:inline-block uy:relative uy:shrink-0", defaultVariants: { size: "md", variant: "circle" } }), s = n.forwardRef(({ size: t = "md", variant: n = "circle", color: r, className: s, ...c }, l) => { let u = o({ variant: n, size: t, color: r, className: s }); return /* @__PURE__ */ i(e, { variant: n, size: t, hasPair: !1, color: r, children: /* @__PURE__ */ i(a.Root, { ref: l, role: "img", className: u, "data-dd-privacy": "allow", ...c }) }); }); s.displayName = a.Root.displayName; //#endregion export { s as Avatar };