import { cx } from "@karma/cva";
import * as AvatarPrimitive from "@radix-ui/react-avatar";
import * as React from "react";

export type AvatarImageProps = React.ComponentPropsWithoutRef<
  typeof AvatarPrimitive.Fallback
>;

export const AvatarImage = React.forwardRef<
  React.ElementRef<typeof AvatarPrimitive.Image>,
  AvatarImageProps
>(({ className, ...props }, ref) => (
  <AvatarPrimitive.Image
    ref={ref}
    className={cx("aspect-square h-full w-full", className)}
    {...props}
  />
));

AvatarImage.displayName = AvatarPrimitive.Image.displayName;
