mirror of
https://github.com/LukeHagar/better-auth.git
synced 2025-12-10 04:19:32 +00:00
fix: demo build & upgrades (#2848)
This commit is contained in:
committed by
GitHub
parent
77c38594bb
commit
06ca627a6a
@@ -5,43 +5,49 @@ import * as AvatarPrimitive from "@radix-ui/react-avatar";
|
||||
|
||||
import { cn } from "@/lib/utils";
|
||||
|
||||
const Avatar = ({
|
||||
function Avatar({
|
||||
className,
|
||||
...props
|
||||
}: React.ComponentPropsWithoutRef<typeof AvatarPrimitive.Root>) => (
|
||||
<AvatarPrimitive.Root
|
||||
className={cn(
|
||||
"relative flex h-10 w-10 shrink-0 overflow-hidden rounded-full",
|
||||
className,
|
||||
)}
|
||||
{...props}
|
||||
/>
|
||||
);
|
||||
Avatar.displayName = AvatarPrimitive.Root.displayName;
|
||||
}: 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}
|
||||
/>
|
||||
);
|
||||
}
|
||||
|
||||
const AvatarImage = ({
|
||||
function AvatarImage({
|
||||
className,
|
||||
...props
|
||||
}: React.ComponentPropsWithoutRef<typeof AvatarPrimitive.Image>) => (
|
||||
<AvatarPrimitive.Image
|
||||
className={cn("aspect-square h-full w-full", className)}
|
||||
{...props}
|
||||
/>
|
||||
);
|
||||
AvatarImage.displayName = AvatarPrimitive.Image.displayName;
|
||||
}: React.ComponentProps<typeof AvatarPrimitive.Image>) {
|
||||
return (
|
||||
<AvatarPrimitive.Image
|
||||
data-slot="avatar-image"
|
||||
className={cn("aspect-square size-full", className)}
|
||||
{...props}
|
||||
/>
|
||||
);
|
||||
}
|
||||
|
||||
const AvatarFallback = ({
|
||||
function AvatarFallback({
|
||||
className,
|
||||
...props
|
||||
}: React.ComponentPropsWithoutRef<typeof AvatarPrimitive.Fallback>) => (
|
||||
<AvatarPrimitive.Fallback
|
||||
className={cn(
|
||||
"flex h-full w-full items-center justify-center rounded-full bg-muted",
|
||||
className,
|
||||
)}
|
||||
{...props}
|
||||
/>
|
||||
);
|
||||
AvatarFallback.displayName = AvatarPrimitive.Fallback.displayName;
|
||||
}: 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 };
|
||||
|
||||
Reference in New Issue
Block a user