Source identity
| Field | Recorded value |
|---|---|
| Source type | GitHub source |
| Original record | Janady13/llms-txt-hub / packages/design-system/components/shadcn/avatar.tsx |
| Date | Not specified in source |
| Repository | Janady13/llms-txt-hub |
| Revision | e0f4bf978d4df168369c7601d9c5f5ea89e84377 |
| Branch | main |
| Path or archive member | packages/design-system/components/shadcn/avatar.tsx |
| Original SHA-256 | e3fa4334f377c0713a2d2ef397aca409315dfc4e52022b91abbba3ff82814f1b |
| Git blob SHA | 32201b6462fc00e8d6a902c64d44d007c763e7be |
| Reading-copy SHA-256 | e3fa4334f377c0713a2d2ef397aca409315dfc4e52022b91abbba3ff82814f1b |
Recovered source transcript
Download complete source text ↓42 lines · 1.0 KB
'use client'
import * as AvatarPrimitive from '@radix-ui/react-avatar'
import * as React from 'react'
import { cn } from '../../lib/utils'
function Avatar({ className, ...props }: React.ComponentProps<typeof AvatarPrimitive.Root>) {
return (
<AvatarPrimitive.Root
data-slot="avatar"
className={cn('relative flex size-8 shrink-0 overflow-hidden rounded-full', className)}
{...props}
/>
)
}
function AvatarImage({ className, ...props }: React.ComponentProps<typeof AvatarPrimitive.Image>) {
return (
<AvatarPrimitive.Image
data-slot="avatar-image"
className={cn('aspect-square size-full', className)}
{...props}
/>
)
}
function AvatarFallback({
className,
...props
}: React.ComponentProps<typeof AvatarPrimitive.Fallback>) {
return (
<AvatarPrimitive.Fallback
data-slot="avatar-fallback"
className={cn('bg-muted flex size-full items-center justify-center rounded-full', className)}
{...props}
/>
)
}
export { Avatar, AvatarImage, AvatarFallback }