Skip to content

Commit 432d9f5

Browse files
committed
fix: avatar bordered
1 parent a951c06 commit 432d9f5

File tree

2 files changed

+8
-3
lines changed

2 files changed

+8
-3
lines changed

src/components/Avatar.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@ export const Avatar: React.FC<AvatarProps> = ({
4949
className={classNames(sizeClasses[size], {
5050
rounded: !rounded,
5151
'rounded-full': rounded,
52-
'rounded-full p-1 ring-2 ring-gray-300 dark:ring-gray-500': bordered,
52+
'p-1 ring-2 ring-gray-300 dark:ring-gray-500': bordered,
5353
})}
5454
src={img}
5555
alt="Rounded avatar"
@@ -59,7 +59,7 @@ export const Avatar: React.FC<AvatarProps> = ({
5959
className={classNames(`relative overflow-hidden bg-gray-100 dark:bg-gray-600`, sizeClasses[size], {
6060
rounded: !rounded,
6161
'rounded-full': rounded,
62-
'rounded-full p-1 ring-2 ring-gray-300 dark:ring-gray-500': bordered,
62+
'p-1 ring-2 ring-gray-300 dark:ring-gray-500': bordered,
6363
})}
6464
>
6565
<svg

src/pages/AvatarPage.tsx

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,12 @@ const AvatarPage: FC = () => {
1616
},
1717
{
1818
title: 'Bordered Avatar',
19-
code: <Avatar img="https://flowbite.com/docs/images/people/profile-picture-5.jpg" bordered />,
19+
code: (
20+
<div className="flex flex-wrap gap-2">
21+
<Avatar img="https://flowbite.com/docs/images/people/profile-picture-5.jpg" rounded bordered />
22+
<Avatar img="https://flowbite.com/docs/images/people/profile-picture-5.jpg" bordered />
23+
</div>
24+
),
2025
},
2126
{
2227
title: 'Placeholder',

0 commit comments

Comments
 (0)