19 lines
471 B
Vue
19 lines
471 B
Vue
<script setup lang="ts">
|
|
import type { HTMLAttributes } from 'vue'
|
|
import type { BadgeVariants } from '.'
|
|
import { cn } from '@/lib/utils'
|
|
import { badgeVariants } from '.'
|
|
|
|
const props = withDefaults(defineProps<{
|
|
variant?: BadgeVariants['variant']
|
|
class?: HTMLAttributes['class']
|
|
}>(), {
|
|
variant: 'primary',
|
|
})
|
|
</script>
|
|
|
|
<template>
|
|
<span data-slot="badge" :class="cn(badgeVariants({ variant: props.variant }), props.class)">
|
|
<slot />
|
|
</span>
|
|
</template>
|