Skip to content

Commit f21b57b

Browse files
committed
fix(blocks): render tooltip field in sub-block label
1 parent cf233bb commit f21b57b

File tree

1 file changed

+13
-0
lines changed
  • apps/sim/app/workspace/[workspaceId]/w/[workflowId]/components/panel/components/editor/components/sub-block

1 file changed

+13
-0
lines changed

apps/sim/app/workspace/[workspaceId]/w/[workflowId]/components/panel/components/editor/components/sub-block/sub-block.tsx

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@ import {
77
Check,
88
Clipboard,
99
ExternalLink,
10+
Info,
1011
} from 'lucide-react'
1112
import { useParams } from 'next/navigation'
1213
import { Button, Input, Label, Tooltip } from '@/components/emcn/components'
@@ -249,6 +250,18 @@ const renderLabel = (
249250
<Label className='flex items-baseline gap-1.5 whitespace-nowrap'>
250251
{config.title}
251252
{required && <span className='ml-0.5'>*</span>}
253+
{config.tooltip && (
254+
<Tooltip.Root>
255+
<Tooltip.Trigger asChild>
256+
<span className='inline-flex'>
257+
<Info className='h-3 w-3 flex-shrink-0 cursor-pointer text-muted-foreground' />
258+
</span>
259+
</Tooltip.Trigger>
260+
<Tooltip.Content side='top'>
261+
<p>{config.tooltip}</p>
262+
</Tooltip.Content>
263+
</Tooltip.Root>
264+
)}
252265
{labelSuffix}
253266
{config.type === 'code' &&
254267
config.language === 'json' &&

0 commit comments

Comments
 (0)