replace el-tag with Badge

This commit is contained in:
pa
2026-01-07 17:41:33 +09:00
committed by Natsumi
parent 02e221e307
commit f819a3f500
16 changed files with 272 additions and 414 deletions

View File

@@ -2,6 +2,7 @@
import { Primitive } from 'reka-ui';
import { cn } from '@/lib/utils';
import { reactiveOmit } from '@vueuse/core';
import { useAttrs } from 'vue';
import { badgeVariants } from '.';
@@ -13,10 +14,14 @@
});
const delegatedProps = reactiveOmit(props, 'class');
const attrs = useAttrs();
</script>
<template>
<Primitive data-slot="badge" :class="cn(badgeVariants({ variant }), props.class)" v-bind="delegatedProps">
<Primitive
data-slot="badge"
:class="cn(badgeVariants({ variant }), props.class)"
v-bind="{ ...delegatedProps, ...attrs }">
<slot />
</Primitive>
</template>