UNPKG

@arolariu/components

Version:

🎨 70+ beautiful, accessible React components built on Radix UI. TypeScript-first, tree-shakeable, SSR-ready. Perfect for modern web apps, design systems & rapid prototyping. Zero config, maximum flexibility! ⚡

26 lines (25 loc) • 1.16 kB
"use client"; import { jsx } from "react/jsx-runtime"; import { Fallback, Image, Root } from "@radix-ui/react-avatar"; import { forwardRef } from "react"; import { cn } from "../../lib/utilities.js"; const Avatar = /*#__PURE__*/ forwardRef(({ className, ...props }, ref)=>/*#__PURE__*/ jsx(Root, { ref: ref, className: cn("relative flex h-10 w-10 shrink-0 overflow-hidden rounded-full", className), ...props })); Avatar.displayName = Root.displayName; const AvatarImage = /*#__PURE__*/ forwardRef(({ className, ...props }, ref)=>/*#__PURE__*/ jsx(Image, { ref: ref, className: cn("aspect-square h-full w-full", className), ...props })); AvatarImage.displayName = Image.displayName; const AvatarFallback = /*#__PURE__*/ forwardRef(({ className, ...props }, ref)=>/*#__PURE__*/ jsx(Fallback, { ref: ref, className: cn("flex h-full w-full items-center justify-center rounded-full bg-neutral-100 dark:bg-neutral-800", className), ...props })); AvatarFallback.displayName = Fallback.displayName; export { Avatar, AvatarFallback, AvatarImage }; //# sourceMappingURL=avatar.js.map