mirror of
https://github.com/Comfy-Org/ComfyUI_frontend.git
synced 2026-05-05 21:54:50 +00:00
feat: align BaseTooltip with Figma design, add Storybook, fix as-child nesting
- Update tooltip variants: shadow-interface, leading-none, export FOR_STORIES - Add keybind and showIcon props to BaseTooltip per Figma design spec - Add comprehensive Storybook stories for all tooltip variants - Fix Popover + BaseTooltip as-child nesting conflict in JobHistoryActionsMenu and JobFilterActions by moving BaseTooltip outside the Popover #button slot Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -18,6 +18,8 @@ const {
|
||||
side = 'top',
|
||||
sideOffset = 4,
|
||||
size = 'small',
|
||||
keybind,
|
||||
showIcon = false,
|
||||
delayDuration,
|
||||
disabled = false,
|
||||
class: className
|
||||
@@ -26,6 +28,8 @@ const {
|
||||
side?: 'top' | 'bottom' | 'left' | 'right'
|
||||
sideOffset?: number
|
||||
size?: NonNullable<TooltipVariants['size']>
|
||||
keybind?: string
|
||||
showIcon?: boolean
|
||||
delayDuration?: number
|
||||
disabled?: boolean
|
||||
class?: HTMLAttributes['class']
|
||||
@@ -43,7 +47,23 @@ const {
|
||||
:side-offset="sideOffset"
|
||||
:class="cn(tooltipVariants({ size }), className)"
|
||||
>
|
||||
{{ text }}
|
||||
<span
|
||||
v-if="keybind || (showIcon && size === 'small')"
|
||||
class="inline-flex items-center gap-2"
|
||||
>
|
||||
<span>{{ text }}</span>
|
||||
<i
|
||||
v-if="showIcon && size === 'small'"
|
||||
class="icon-[lucide--chevron-right] size-4 shrink-0"
|
||||
/>
|
||||
<span
|
||||
v-if="keybind"
|
||||
class="shrink-0 rounded-sm bg-interface-menu-keybind-surface-default px-1 text-xs leading-none"
|
||||
>
|
||||
{{ keybind }}
|
||||
</span>
|
||||
</span>
|
||||
<template v-else>{{ text }}</template>
|
||||
<TooltipArrow
|
||||
:width="8"
|
||||
:height="5"
|
||||
|
||||
Reference in New Issue
Block a user