@arolariu/components
Version:
A collection of reusable components for React applications, built as ESM & CJS modules with tree shake, minify and bundler optimizations enabled, for the lowest bundle size (import cost)!
1 lines • 2.07 kB
Source Map (JSON)
{"version":3,"file":"components\\ui\\avatar.cjs","sources":["webpack://@arolariu/components/./src/components/ui/avatar.tsx"],"sourcesContent":["\r\n\r\nimport * as React from \"react\";\r\nimport * as AvatarPrimitive from \"@radix-ui/react-avatar\";\r\nimport { cn } from \"./../../lib/utils\";\r\n\r\nfunction Avatar({\r\n className,\r\n ...props\r\n}: React.ComponentProps<typeof AvatarPrimitive.Root>) {\r\n return (\r\n <AvatarPrimitive.Root\r\n data-slot=\"avatar\"\r\n className={cn(\r\n \"relative flex size-8 shrink-0 overflow-hidden rounded-full\",\r\n className\r\n )}\r\n {...props}\r\n />\r\n );\r\n}\r\n\r\nfunction AvatarImage({\r\n className,\r\n ...props\r\n}: React.ComponentProps<typeof AvatarPrimitive.Image>) {\r\n return (\r\n <AvatarPrimitive.Image\r\n data-slot=\"avatar-image\"\r\n className={cn(\"aspect-square size-full\", className)}\r\n {...props}\r\n />\r\n );\r\n}\r\n\r\nfunction AvatarFallback({\r\n className,\r\n ...props\r\n}: React.ComponentProps<typeof AvatarPrimitive.Fallback>) {\r\n return (\r\n <AvatarPrimitive.Fallback\r\n data-slot=\"avatar-fallback\"\r\n className={cn(\r\n \"bg-neutral-100 flex size-full items-center justify-center rounded-full dark:bg-neutral-800\",\r\n className\r\n )}\r\n {...props}\r\n />\r\n );\r\n}\r\n\r\nexport { Avatar, AvatarImage, AvatarFallback };\r\n"],"names":["Avatar","className","props","AvatarPrimitive","cn","AvatarImage","AvatarFallback"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAMA,SAASA,OAAO,EACdC,SAAS,EACT,GAAGC,OAC+C;IAClD,OACE,WADF,GACE,qCAACC,6BAAAA,IAAoB;QACnB,aAAU;QACV,WAAWC,IAAAA,0BAAAA,EAAAA,EACT,8DACAH;QAED,GAAGC,KAAK;;AAGf;AAEA,SAASG,YAAY,EACnBJ,SAAS,EACT,GAAGC,OACgD;IACnD,OACE,WADF,GACE,qCAACC,6BAAAA,KAAqB;QACpB,aAAU;QACV,WAAWC,IAAAA,0BAAAA,EAAAA,EAAG,2BAA2BH;QACxC,GAAGC,KAAK;;AAGf;AAEA,SAASI,eAAe,EACtBL,SAAS,EACT,GAAGC,OACmD;IACtD,OACE,WADF,GACE,qCAACC,6BAAAA,QAAwB;QACvB,aAAU;QACV,WAAWC,IAAAA,0BAAAA,EAAAA,EACT,8FACAH;QAED,GAAGC,KAAK;;AAGf"}