mirror of
https://github.com/Comfy-Org/ComfyUI_frontend.git
synced 2026-02-08 00:50:05 +00:00
<img width="1264" height="730" alt="CleanShot 2026-01-23 at 21 27 45@2x" src="https://github.com/user-attachments/assets/9834b673-8467-44c0-b487-d9dd9e4475d0" /> ┆Issue is synchronized with this [Notion page](https://www.notion.so/PR-8278-fix-add-tooltips-for-various-settings-in-the-right-side-panel-2f16d73d365081e2816cfdf24fa7687f) by [Unito](https://www.unito.io)
44 lines
829 B
Vue
44 lines
829 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(
|
|
'text-sm text-muted-foreground truncate group',
|
|
tooltip ? 'cursor-help' : '',
|
|
singleline ? 'flex-1' : ''
|
|
)
|
|
"
|
|
>
|
|
{{ label }}
|
|
|
|
<i
|
|
v-if="tooltip"
|
|
class="icon-[lucide--info] ml-0.5 size-3 relative top-[1px] group-hover:text-primary"
|
|
/>
|
|
</span>
|
|
<slot />
|
|
</div>
|
|
</template>
|