Skip to content

Commit

Permalink
fix(Chip): proxy attrs to slot
Browse files Browse the repository at this point in the history
Resolves #2484
  • Loading branch information
benjamincanac committed Oct 31, 2024
1 parent b416a19 commit 8669553
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions src/runtime/components/Chip.vue
Original file line number Diff line number Diff line change
Expand Up @@ -41,9 +41,11 @@ export interface ChipSlots {

<script setup lang="ts">
import { computed } from 'vue'
import { Primitive } from 'radix-vue'
import { Primitive, Slot } from 'radix-vue'
import { useAvatarGroup } from '../composables/useAvatarGroup'
defineOptions({ inheritAttrs: false })
const props = withDefaults(defineProps<ChipProps>(), {
inset: false,
standalone: false
Expand All @@ -65,7 +67,9 @@ const ui = computed(() => chip({

<template>
<Primitive :as="as" :class="ui.root({ class: [props.class, props.ui?.root] })">
<slot />
<Slot v-bind="$attrs">
<slot />
</Slot>

<span v-if="show" :class="ui.base({ class: props.ui?.base })">
<slot name="content">
Expand Down

0 comments on commit 8669553

Please sign in to comment.