mirror of
https://github.com/MrUnknownDE/VRCX.git
synced 2026-05-06 06:46:04 +02:00
28 lines
763 B
Vue
28 lines
763 B
Vue
<script setup>
|
|
import { Primitive } from 'reka-ui';
|
|
import { cn } from '@/lib/utils';
|
|
import { reactiveOmit } from '@vueuse/core';
|
|
import { useAttrs } from 'vue';
|
|
|
|
import { badgeVariants } from '.';
|
|
|
|
const props = defineProps({
|
|
asChild: { type: Boolean, required: false },
|
|
as: { type: null, required: false },
|
|
variant: { type: null, required: false },
|
|
class: { type: null, required: false }
|
|
});
|
|
|
|
const delegatedProps = reactiveOmit(props, 'class');
|
|
const attrs = useAttrs();
|
|
</script>
|
|
|
|
<template>
|
|
<Primitive
|
|
data-slot="badge"
|
|
:class="cn(badgeVariants({ variant }), props.class)"
|
|
v-bind="{ ...delegatedProps, ...attrs }">
|
|
<slot />
|
|
</Primitive>
|
|
</template>
|