* chore: add storybook * chore: unify FE codeabse * chore: update eslint rules * chore: harmonize the use of "subtle" color * chore: remove an extra sidebar rail * refactor: make panel items more consistent * chore: cleanups after merging new code from base * refactor: refine composables * fix: add lost import * chore: make icon style consistent * fix: don't show empty "supported" methods * refactor: solidify select items
31 lines
611 B
Vue
31 lines
611 B
Vue
<script setup lang="ts">
|
|
/**
|
|
* @component AppBadge
|
|
* @description A small visual indicator for status, categories, or labels.
|
|
*/
|
|
import { cn } from '@/utils/ui';
|
|
import type { HTMLAttributes } from 'vue';
|
|
import { type BadgeVariants, badgeVariants } from './index';
|
|
|
|
/*
|
|
* Types & Interfaces.
|
|
*/
|
|
|
|
export interface AppBadgeProps {
|
|
variant?: BadgeVariants['variant'];
|
|
class?: HTMLAttributes['class'];
|
|
}
|
|
|
|
/*
|
|
* Component Setup.
|
|
*/
|
|
|
|
const props = defineProps<AppBadgeProps>();
|
|
</script>
|
|
|
|
<template>
|
|
<div :class="cn(badgeVariants({ variant }), props.class)">
|
|
<slot />
|
|
</div>
|
|
</template>
|