Function
Avatar
({
className,
size = "default",
...props
}: React.ComponentProps<typeof AvatarPrimitive.Root> & {
size?: "default" | "sm" | "lg";
})
Source from the content-addressed store, hash-verified
| 4 | import { cn } from "../lib/utils"; |
| 5 | |
| 6 | function Avatar({ |
| 7 | className, |
| 8 | size = "default", |
| 9 | ...props |
| 10 | }: React.ComponentProps<typeof AvatarPrimitive.Root> & { |
| 11 | size?: "default" | "sm" | "lg"; |
| 12 | }) { |
| 13 | return ( |
| 14 | <AvatarPrimitive.Root |
| 15 | data-slot="avatar" |
| 16 | data-size={size} |
| 17 | className={cn( |
| 18 | "group/avatar relative flex size-8 shrink-0 overflow-hidden rounded-full select-none data-[size=lg]:size-10 data-[size=sm]:size-6", |
| 19 | className, |
| 20 | )} |
| 21 | {...props} |
| 22 | /> |
| 23 | ); |
| 24 | } |
| 25 | |
| 26 | function AvatarImage({ className, ...props }: React.ComponentProps<typeof AvatarPrimitive.Image>) { |
| 27 | return ( |
Callers
nothing calls this directly
Tested by
no test coverage detected