langfuse

Форк
0
50 строк · 1.4 Кб
1
"use client";
2

3
import * as React from "react";
4
import * as AvatarPrimitive from "@radix-ui/react-avatar";
5

6
import { cn } from "@/src/utils/tailwind";
7

8
const Avatar = React.forwardRef<
9
  React.ElementRef<typeof AvatarPrimitive.Root>,
10
  React.ComponentPropsWithoutRef<typeof AvatarPrimitive.Root>
11
>(({ className, ...props }, ref) => (
12
  <AvatarPrimitive.Root
13
    ref={ref}
14
    className={cn(
15
      "relative flex h-10 w-10 shrink-0 overflow-hidden rounded-full",
16
      className,
17
    )}
18
    {...props}
19
  />
20
));
21
Avatar.displayName = AvatarPrimitive.Root.displayName;
22

23
const AvatarImage = React.forwardRef<
24
  React.ElementRef<typeof AvatarPrimitive.Image>,
25
  React.ComponentPropsWithoutRef<typeof AvatarPrimitive.Image>
26
>(({ className, ...props }, ref) => (
27
  <AvatarPrimitive.Image
28
    ref={ref}
29
    className={cn("aspect-square h-full w-full", className)}
30
    {...props}
31
  />
32
));
33
AvatarImage.displayName = AvatarPrimitive.Image.displayName;
34

35
const AvatarFallback = React.forwardRef<
36
  React.ElementRef<typeof AvatarPrimitive.Fallback>,
37
  React.ComponentPropsWithoutRef<typeof AvatarPrimitive.Fallback>
38
>(({ className, ...props }, ref) => (
39
  <AvatarPrimitive.Fallback
40
    ref={ref}
41
    className={cn(
42
      "flex h-full w-full items-center justify-center rounded-full bg-muted",
43
      className,
44
    )}
45
    {...props}
46
  />
47
));
48
AvatarFallback.displayName = AvatarPrimitive.Fallback.displayName;
49

50
export { Avatar, AvatarImage, AvatarFallback };
51

Использование cookies

Мы используем файлы cookie в соответствии с Политикой конфиденциальности и Политикой использования cookies.

Нажимая кнопку «Принимаю», Вы даете АО «СберТех» согласие на обработку Ваших персональных данных в целях совершенствования нашего веб-сайта и Сервиса GitVerse, а также повышения удобства их использования.

Запретить использование cookies Вы можете самостоятельно в настройках Вашего браузера.