-
Notifications
You must be signed in to change notification settings - Fork 11
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
4f3ca60
commit 5eec89f
Showing
4 changed files
with
83 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
33 changes: 33 additions & 0 deletions
33
docs/src/components/spark-ui/avatarCircle/AvatarCircles.vue
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
<script setup lang='ts'> | ||
import { cn } from '../../../lib/utils' | ||
interface AvatarCirclesProps { | ||
class?: string | ||
numPeople?: number | ||
avatarUrls: string[] | ||
} | ||
const props = defineProps<AvatarCirclesProps>() | ||
const className = cn( | ||
'z-10 flex -space-x-4 rtl:space-x-reverse', | ||
props.class, | ||
) | ||
</script> | ||
|
||
<template> | ||
<div :class="className"> | ||
<div v-for="(imageUrl, idx) in props.avatarUrls" :key="idx"> | ||
<img | ||
:key="idx" class="h-10 w-10 rounded-full border-2 border-white dark:border-gray-800" :src="imageUrl" | ||
:height="40" :width="40" :alt="`Avatar ${idx + 1}`" | ||
> | ||
</div> | ||
<a | ||
class="flex h-10 w-10 items-center justify-center rounded-full border-2 border-white bg-black text-center text-xs font-medium text-white hover:bg-gray-600 dark:border-gray-800 dark:bg-white dark:text-black" | ||
href="" | ||
> | ||
+{{ props.numPeople }} | ||
</a> | ||
</div> | ||
</template> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
<script setup lang='ts'> | ||
import { cn } from '../../lib/utils' | ||
interface AvatarCirclesProps { | ||
class?: string | ||
numPeople?: number | ||
avatarUrls: string[] | ||
} | ||
const props = defineProps<AvatarCirclesProps>() | ||
const className = cn( | ||
'z-10 flex -space-x-4 rtl:space-x-reverse', | ||
props.class, | ||
) | ||
</script> | ||
|
||
<template> | ||
<div :class="className"> | ||
<div v-for="(imageUrl, idx) in props.avatarUrls" :key="idx"> | ||
<img | ||
:key="idx" class="h-10 w-10 rounded-full border-2 border-white dark:border-gray-800" :src="imageUrl" | ||
:height="40" :width="40" :alt="`Avatar ${idx + 1}`" | ||
> | ||
</div> | ||
<span | ||
class="flex h-10 w-10 items-center justify-center rounded-full border-2 border-white bg-black text-center text-xs font-medium text-white hover:bg-gray-600 dark:border-gray-800 dark:bg-white dark:hover:bg-white dark:text-black" | ||
> | ||
+{{ props.numPeople }} | ||
</span> | ||
</div> | ||
</template> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
<script setup lang='ts'> | ||
import AvatarCircles from './AvatarCircles.vue' | ||
const avatarUrls = [ | ||
'https://github.com/selemondev.png', | ||
'https://avatars.githubusercontent.com/u/20110627', | ||
'https://avatars.githubusercontent.com/u/106103625', | ||
'https://avatars.githubusercontent.com/u/59228569', | ||
] | ||
</script> | ||
|
||
<template> | ||
<div class="grid place-items-center w-full min-h-screen"> | ||
<AvatarCircles :num-people="99" :avatar-urls="avatarUrls" /> | ||
</div> | ||
</template> |