mirror of
https://github.com/Comfy-Org/ComfyUI_frontend.git
synced 2026-02-07 16:40:05 +00:00
Backport of #8202 to `cloud/1.37` Automatically created by backport workflow. ┆Issue is synchronized with this [Notion page](https://www.notion.so/PR-8231-backport-cloud-1-37-feat-StatusBadge-add-dot-mode-with-CVA-variants-2f06d73d365081438b3ee0121ef4f239) by [Unito](https://www.unito.io) Co-authored-by: Alexander Brown <drjkl@comfy.org> Co-authored-by: Amp <amp@ampcode.com>
28 lines
549 B
Vue
28 lines
549 B
Vue
<script setup lang="ts">
|
|
import { statusBadgeVariants } from './statusBadge.variants'
|
|
import type { StatusBadgeVariants } from './statusBadge.variants'
|
|
|
|
const {
|
|
label,
|
|
severity = 'default',
|
|
variant
|
|
} = defineProps<{
|
|
label?: string | number
|
|
severity?: StatusBadgeVariants['severity']
|
|
variant?: StatusBadgeVariants['variant']
|
|
}>()
|
|
</script>
|
|
|
|
<template>
|
|
<span
|
|
:class="
|
|
statusBadgeVariants({
|
|
severity,
|
|
variant: variant ?? (label == null ? 'dot' : 'label')
|
|
})
|
|
"
|
|
>
|
|
{{ label }}
|
|
</span>
|
|
</template>
|