@@ -30,6 +30,7 @@ import {
3030import { formatDuration } from '@sim/utils/formatting'
3131import { ReactFlowProvider } from '@xyflow/react'
3232import { useParams } from 'next/navigation'
33+ import { WorkflowPreviewAction } from '@/components/workflow/workflow-preview-action'
3334import { extractReferencePrefixes } from '@/lib/workflows/sanitization/references'
3435import {
3536 buildCanonicalIndexForSurface ,
@@ -1380,31 +1381,18 @@ function PreviewEditorContent({
13801381 cursorStyle = 'grab'
13811382 />
13821383 </ div >
1383- < Tooltip . Root >
1384- < Tooltip . Trigger asChild >
1385- < Button
1386- aria-label = {
1387- isExecutionMode && onDrillDown
1388- ? 'Expand workflow'
1389- : 'Open in new tab'
1390- }
1391- type = 'button'
1392- variant = 'ghost'
1393- onClick = { handleExpandChildWorkflow }
1394- iconSize = 'compact-fixed'
1395- className = 'absolute right-[6px] bottom-1.5 z-10 cursor-pointer border border-[var(--border)] bg-[var(--surface-2)] hover-hover:bg-[var(--surface-4)]'
1396- >
1397- { isExecutionMode && onDrillDown ? (
1398- < Expand className = 'size-[12px]' />
1399- ) : (
1400- < SquareArrowUpRight className = 'size-[12px]' />
1401- ) }
1402- </ Button >
1403- </ Tooltip . Trigger >
1404- < Tooltip . Content side = 'top' >
1405- { isExecutionMode && onDrillDown ? 'Expand workflow' : 'Open in new tab' }
1406- </ Tooltip . Content >
1407- </ Tooltip . Root >
1384+ < WorkflowPreviewAction
1385+ aria-label = {
1386+ isExecutionMode && onDrillDown ? 'Expand workflow' : 'Open in new tab'
1387+ }
1388+ onClick = { handleExpandChildWorkflow }
1389+ >
1390+ { isExecutionMode && onDrillDown ? (
1391+ < Expand className = 'size-[12px]' />
1392+ ) : (
1393+ < SquareArrowUpRight className = 'size-[12px]' />
1394+ ) }
1395+ </ WorkflowPreviewAction >
14081396 </ >
14091397 ) : (
14101398 < div className = 'flex h-full items-center justify-center bg-[var(--surface-3)]' >
0 commit comments