RezinaLMS-Admin/src/components/ui/avatar.tsx
Yared Yemane 31cc7baa32 Improve admin UX for practices, personas, navigation, and team management.
Add edit-practice dirty-state save gating, back navigation helpers, realistic persona avatars with circular cropping, global API error toasts, team invite role fixes, user/team block-unblock on detail pages, and related content-management polish.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-07-03 07:56:43 -07:00

43 lines
1.4 KiB
TypeScript

import * as React from "react"
import * as AvatarPrimitive from "@radix-ui/react-avatar"
import { cn } from "../../lib/utils"
export const Avatar = React.forwardRef<
React.ElementRef<typeof AvatarPrimitive.Root>,
React.ComponentPropsWithoutRef<typeof AvatarPrimitive.Root>
>(({ className, ...props }, ref) => (
<AvatarPrimitive.Root
ref={ref}
className={cn("relative flex h-10 w-10 shrink-0 overflow-hidden rounded-full", className)}
{...props}
/>
))
Avatar.displayName = AvatarPrimitive.Root.displayName
export const AvatarImage = React.forwardRef<
React.ElementRef<typeof AvatarPrimitive.Image>,
React.ComponentPropsWithoutRef<typeof AvatarPrimitive.Image>
>(({ className, ...props }, ref) => (
<AvatarPrimitive.Image
ref={ref}
className={cn("aspect-square h-full w-full object-cover object-center", className)}
{...props}
/>
))
AvatarImage.displayName = AvatarPrimitive.Image.displayName
export const AvatarFallback = React.forwardRef<
React.ElementRef<typeof AvatarPrimitive.Fallback>,
React.ComponentPropsWithoutRef<typeof AvatarPrimitive.Fallback>
>(({ className, ...props }, ref) => (
<AvatarPrimitive.Fallback
ref={ref}
className={cn("flex h-full w-full items-center justify-center rounded-full bg-grayScale-200 text-sm font-semibold", className)}
{...props}
/>
))
AvatarFallback.displayName = AvatarPrimitive.Fallback.displayName