feat: Added stacked avatars

This commit is contained in:
Ilya Artamonov
2022-09-06 16:36:58 +03:00
parent a3e93e1ef1
commit 68440bac7f
7 changed files with 87 additions and 3 deletions

View File

@@ -4,6 +4,9 @@ import AvatarBorderedExample from './examples/AvatarBorderedExample.vue'
import AvatarDotIndicatorExample from './examples/AvatarDotIndicatorExample.vue'
import AvatarSizeExample from './examples/AvatarSizeExample.vue'
import AvatarDotIndicatorPositionExample from './examples/AvatarDotIndicatorPositionExample.vue'
import AvatarAlternativeTextExample from './examples/AvatarAlternativeTextExample.vue'
import StackedAvatarsExample from './examples/StackedAvatarsExample.vue'
</script>
# Avatar
Use the avatar component to show a visual representation of a user profile using an image element or SVG object based on multiple styles and sizes
@@ -100,3 +103,33 @@ import { Avatar } from 'flowbite-vue'
</div>
</template>
```
## Alternative text
<AvatarAlternativeTextExample />
## Stacked avatars
<StackedAvatarsExample />
```vue
<script setup>
import { StackedAvatars, Avatar, StackedAvatarsCounter } from 'flowbite-vue'
</script>
<template>
<StackedAvatars>
<Avatar stacked img="https://flowbite.com/docs/images/people/profile-picture-1.jpg" rounded />
<Avatar stacked img="https://flowbite.com/docs/images/people/profile-picture-2.jpg" rounded />
<Avatar stacked img="https://flowbite.com/docs/images/people/profile-picture-3.jpg" rounded />
<Avatar stacked img="https://flowbite.com/docs/images/people/profile-picture-4.jpg" rounded />
<Avatar stacked img="https://flowbite.com/docs/images/people/profile-picture-5.jpg" rounded />
</StackedAvatars>
<StackedAvatars class="mt-2.5">
<Avatar stacked img="https://flowbite.com/docs/images/people/profile-picture-1.jpg" rounded />
<Avatar stacked img="https://flowbite.com/docs/images/people/profile-picture-2.jpg" rounded />
<Avatar stacked img="https://flowbite.com/docs/images/people/profile-picture-3.jpg" rounded />
<Avatar stacked img="https://flowbite.com/docs/images/people/profile-picture-4.jpg" rounded />
<StackedAvatarsCounter total="99" href="#" />
</StackedAvatars>
</template>
```

View File

@@ -0,0 +1,8 @@
<template>
<div class="vp-raw flex">
<Avatar status="online" alt="Alternative text" img="https://flowbite.com/docs/images/people/profile-picture-5.jpg"/>
</div>
</template>
<script setup>
import { Avatar } from '../../../../src/index'
</script>

View File

@@ -0,0 +1,21 @@
<template>
<div class="vp-raw flex-col">
<StackedAvatars>
<Avatar stacked img="https://flowbite.com/docs/images/people/profile-picture-1.jpg" rounded />
<Avatar stacked img="https://flowbite.com/docs/images/people/profile-picture-2.jpg" rounded />
<Avatar stacked img="https://flowbite.com/docs/images/people/profile-picture-3.jpg" rounded />
<Avatar stacked img="https://flowbite.com/docs/images/people/profile-picture-4.jpg" rounded />
<Avatar stacked img="https://flowbite.com/docs/images/people/profile-picture-5.jpg" rounded />
</StackedAvatars>
<StackedAvatars class="mt-2.5">
<Avatar stacked img="https://flowbite.com/docs/images/people/profile-picture-1.jpg" rounded />
<Avatar stacked img="https://flowbite.com/docs/images/people/profile-picture-2.jpg" rounded />
<Avatar stacked img="https://flowbite.com/docs/images/people/profile-picture-3.jpg" rounded />
<Avatar stacked img="https://flowbite.com/docs/images/people/profile-picture-4.jpg" rounded />
<StackedAvatarsCounter total="99" href="#" />
</StackedAvatars>
</div>
</template>
<script setup>
import { StackedAvatars, Avatar, StackedAvatarsCounter } from '../../../../src/index'
</script>