Skip to content

Commit

Permalink
up
Browse files Browse the repository at this point in the history
  • Loading branch information
smarroufin committed Jul 11, 2022
1 parent 76f8253 commit 8a53bc9
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 3 deletions.
16 changes: 14 additions & 2 deletions src/runtime/components/elements/AvatarGroup.vue
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@

<script setup lang="ts">
import { computed } from 'vue'
import { classNames } from '../../utils/'
import Avatar from './Avatar'
import $ui from '#build/ui'
Expand All @@ -37,9 +38,13 @@ const props = defineProps({
type: Number,
default: null
},
avatarClass: {
ringClass: {
type: String,
default: () => $ui.avatarGroup.avatar
default: () => $ui.avatarGroup.ring
},
marginClass: {
type: String,
default: () => $ui.avatarGroup.margin
}
})
Expand All @@ -60,6 +65,13 @@ const remainingGroupSize = computed(() => {
return avatars.value.length - props.max
})
const avatarClass = computed(() => {
return classNames(
props.ringClass,
props.marginClass
)
})
</script>

<script lang="ts">
Expand Down
3 changes: 2 additions & 1 deletion src/runtime/presets/default.ts
Original file line number Diff line number Diff line change
Expand Up @@ -374,7 +374,8 @@ export default (variantColors: string[]) => {
}

const avatarGroup = {
avatar: 'ring-2 u-ring-white -ml-1.5 first:ml-0'
ring: 'ring-2 u-ring-white',
margin: '-ml-1.5 first:ml-0'
}

const slideover = {
Expand Down

0 comments on commit 8a53bc9

Please sign in to comment.