mirror of
https://github.com/Comfy-Org/ComfyUI_frontend.git
synced 2026-01-26 19:09:52 +00:00
Co-authored-by: Amp <amp@ampcode.com> Amp-Thread-ID: https://ampcode.com/threads/T-019bd8c8-bce1-70bc-a125-baf2a1503ee8
39 lines
681 B
Vue
39 lines
681 B
Vue
<script setup lang="ts">
|
|
import { cn } from '@comfyorg/tailwind-utils'
|
|
|
|
defineProps<{
|
|
label: string
|
|
tooltip?: string
|
|
singleline?: boolean
|
|
}>()
|
|
</script>
|
|
|
|
<template>
|
|
<div
|
|
:class="
|
|
cn('flex gap-2', singleline ? 'items-center justify-between' : 'flex-col')
|
|
"
|
|
>
|
|
<span
|
|
v-tooltip.left="
|
|
tooltip
|
|
? {
|
|
value: tooltip,
|
|
showDelay: 300
|
|
}
|
|
: null
|
|
"
|
|
:class="
|
|
cn(
|
|
'truncate text-sm text-muted-foreground',
|
|
tooltip ? 'cursor-help' : '',
|
|
singleline ? 'flex-1' : ''
|
|
)
|
|
"
|
|
>
|
|
{{ label }}
|
|
</span>
|
|
<slot />
|
|
</div>
|
|
</template>
|