@@ -29,6 +29,7 @@ import {
2929import { formatDuration } from '@sim/utils/formatting'
3030import { ReactFlowProvider } from '@xyflow/react'
3131import { useParams } from 'next/navigation'
32+ import { WorkflowPreviewAction } from '@/components/workflow/workflow-preview-action'
3233import { extractReferencePrefixes } from '@/lib/workflows/sanitization/references'
3334import {
3435 buildCanonicalIndexForSurface ,
@@ -1387,31 +1388,18 @@ function PreviewEditorContent({
13871388 cursorStyle = 'grab'
13881389 />
13891390 </ div >
1390- < Tooltip . Root >
1391- < Tooltip . Trigger asChild >
1392- < Button
1393- aria-label = {
1394- isExecutionMode && onDrillDown
1395- ? 'Expand workflow'
1396- : 'Open in new tab'
1397- }
1398- type = 'button'
1399- variant = 'ghost'
1400- onClick = { handleExpandChildWorkflow }
1401- iconSize = 'compact-fixed'
1402- 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)]'
1403- >
1404- { isExecutionMode && onDrillDown ? (
1405- < Expand className = 'size-[12px]' />
1406- ) : (
1407- < SquareArrowUpRight className = 'size-[12px]' />
1408- ) }
1409- </ Button >
1410- </ Tooltip . Trigger >
1411- < Tooltip . Content side = 'top' >
1412- { isExecutionMode && onDrillDown ? 'Expand workflow' : 'Open in new tab' }
1413- </ Tooltip . Content >
1414- </ Tooltip . Root >
1391+ < WorkflowPreviewAction
1392+ aria-label = {
1393+ isExecutionMode && onDrillDown ? 'Expand workflow' : 'Open in new tab'
1394+ }
1395+ onClick = { handleExpandChildWorkflow }
1396+ >
1397+ { isExecutionMode && onDrillDown ? (
1398+ < Expand className = 'size-[12px]' />
1399+ ) : (
1400+ < SquareArrowUpRight className = 'size-[12px]' />
1401+ ) }
1402+ </ WorkflowPreviewAction >
14151403 </ >
14161404 ) : (
14171405 < div className = 'flex h-full items-center justify-center bg-[var(--surface-3)]' >
0 commit comments