Skip to content

Commit da227e3

Browse files
committed
fix: avatar object cover
1 parent 9a627b7 commit da227e3

1 file changed

Lines changed: 10 additions & 10 deletions

File tree

src/components/ui/avatar.tsx

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,19 +1,19 @@
1-
"use client";
1+
'use client';
22

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

6-
import { cn } from "@/lib/utils";
6+
import { cn } from '@/lib/utils';
77

88
function Avatar({
99
className,
1010
...props
1111
}: React.ComponentProps<typeof AvatarPrimitive.Root>) {
1212
return (
1313
<AvatarPrimitive.Root
14-
data-slot="avatar"
14+
data-slot='avatar'
1515
className={cn(
16-
"relative flex size-8 shrink-0 overflow-hidden rounded-full",
16+
'relative flex size-8 shrink-0 overflow-hidden rounded-full',
1717
className
1818
)}
1919
{...props}
@@ -27,8 +27,8 @@ function AvatarImage({
2727
}: React.ComponentProps<typeof AvatarPrimitive.Image>) {
2828
return (
2929
<AvatarPrimitive.Image
30-
data-slot="avatar-image"
31-
className={cn("aspect-square size-full", className)}
30+
data-slot='avatar-image'
31+
className={cn('aspect-square object-cover size-full', className)}
3232
{...props}
3333
/>
3434
);
@@ -40,9 +40,9 @@ function AvatarFallback({
4040
}: React.ComponentProps<typeof AvatarPrimitive.Fallback>) {
4141
return (
4242
<AvatarPrimitive.Fallback
43-
data-slot="avatar-fallback"
43+
data-slot='avatar-fallback'
4444
className={cn(
45-
"bg-muted flex size-full items-center justify-center rounded-full",
45+
'bg-muted flex size-full items-center justify-center rounded-full',
4646
className
4747
)}
4848
{...props}

0 commit comments

Comments
 (0)