MCPcopy Create free account
hub / github.com/UsefulSoftwareCo/executor / Avatar

Function Avatar

packages/react/src/components/avatar.tsx:6–24  ·  view source on GitHub ↗
({
  className,
  size = "default",
  ...props
}: React.ComponentProps<typeof AvatarPrimitive.Root> & {
  size?: "default" | "sm" | "lg";
})

Source from the content-addressed store, hash-verified

4import { cn } from "../lib/utils";
5
6function 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
26function AvatarImage({ className, ...props }: React.ComponentProps<typeof AvatarPrimitive.Image>) {
27 return (

Callers

nothing calls this directly

Calls 1

cnFunction · 0.90

Tested by

no test coverage detected