Skip to content

Commit

Permalink
feat: add avatar-group component
Browse files Browse the repository at this point in the history
  • Loading branch information
saadeghi committed May 21, 2021
1 parent 19b402d commit b5f37bc
Show file tree
Hide file tree
Showing 2 changed files with 46 additions and 0 deletions.
6 changes: 6 additions & 0 deletions src/components/styled/avatar.css
Original file line number Diff line number Diff line change
Expand Up @@ -16,3 +16,9 @@
}
}
}
.avatar-group{
@apply flex overflow-hidden;
.avatar{
@apply rounded-full border-4 border-base-100 overflow-hidden;
}
}
40 changes: 40 additions & 0 deletions src/docs/pages/components/avatar.vue
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,46 @@
</Avatar>
</Wrapper>

<Wrapper title="avatar-group" classes="flex items-center space-x-8 flex-wrap">
<div class="avatar-group -space-x-6">
<Avatar classes="w-16 h-16">
<img src="http://daisyui.com/[email protected]">
</Avatar>
<Avatar classes="w-16 h-16">
<img src="http://daisyui.com/[email protected]">
</Avatar>
<Avatar classes="w-16 h-16">
<img src="http://daisyui.com/[email protected]">
</Avatar>
<Avatar classes="w-16 h-16">
<img src="http://daisyui.com/[email protected]">
</Avatar>
</div>
</Wrapper>

<Wrapper title="avatar-group" classes="flex items-center space-x-8 flex-wrap">
<div class="avatar-group -space-x-5">
<Avatar classes="w-10 h-10">
<img src="http://daisyui.com/[email protected]">
</Avatar>
<Avatar classes="w-10 h-10">
<img src="http://daisyui.com/[email protected]">
</Avatar>
<Avatar classes="w-10 h-10">
<img src="http://daisyui.com/[email protected]">
</Avatar>
<Avatar classes="w-10 h-10">
<img src="http://daisyui.com/[email protected]">
</Avatar>
<div class="avatar placeholder">
<div class="bg-neutral-focus text-neutral-content rounded-full w-10 h-10">
<span>+99</span>
</div>
</div>
</div>
</Wrapper>


<Wrapper title="avatar circle" classes="flex items-center space-x-8 flex-wrap">
<Avatar classes="mb-8 rounded-full w-32 h-32">
<img src="https://i.pravatar.cc/500?img=32" />
Expand Down

0 comments on commit b5f37bc

Please sign in to comment.