File tree Expand file tree Collapse file tree
apps/sim/app/workspace/[workspaceId]/w/[workflowId]/components/workflow-controls Expand file tree Collapse file tree Original file line number Diff line number Diff line change 11import { type ComponentProps , forwardRef } from 'react'
2- import { Button , chipHoverSurfaceClass , cn } from '@sim/emcn'
2+ import { Button } from '@sim/emcn'
33
44interface CanvasControlButtonProps
55 extends Omit <
66 ComponentProps < typeof Button > ,
7- 'variant' | 'size' | 'iconSize' | 'iconPadding' | 'className'
7+ 'variant' | 'size' | 'iconSize' | 'iconPadding' | 'shape' | ' className'
88 > {
99 active ?: boolean
1010 'aria-label' : string
1111}
1212
13- /** Fixed-size action in the canvas navigation toolbar. */
1413export const CanvasControlButton = forwardRef < HTMLButtonElement , CanvasControlButtonProps > (
1514 ( { active = false , ...props } , ref ) => (
16- < Button
17- { ...props }
18- ref = { ref }
19- variant = { active ? 'active' : 'ghost' }
20- className = { cn ( 'size-[28px] rounded-sm p-0' , ! active && chipHoverSurfaceClass ) }
21- />
15+ < Button { ...props } ref = { ref } variant = { active ? 'active' : 'quiet' } iconSize = 'regular' />
2216 )
2317)
2418
Original file line number Diff line number Diff line change 55 Button ,
66 ChevronDown ,
77 Cursor ,
8- chipHoverSurfaceClass ,
98 cn ,
109 disclosureChevronClass ,
1110 Hand ,
@@ -101,7 +100,7 @@ export const WorkflowControls = memo(function WorkflowControls() {
101100 * CONTENT_WINDOW_GAP; these controls measure from the canvas floor and
102101 * wall, so they take the 12 directly.
103102 */
104- className = 'absolute bottom-3 left-3 z-10 flex h-[36px] items-center gap-0.5 rounded-lg border border-[var(--border)] bg-[var(--surface-2)] p-1'
103+ className = 'absolute bottom-3 left-3 z-10 flex h-9 items-center gap-0.5 rounded-lg border border-[var(--border)] bg-[var(--surface-2)] p-1'
105104 onContextMenu = { handleContextMenu }
106105 >
107106 { /* Canvas Mode Selector */ }
@@ -118,11 +117,7 @@ export const WorkflowControls = memo(function WorkflowControls() {
118117 ) }
119118 </ CanvasControlButton >
120119 </ Tooltip . Trigger >
121- < Button
122- aria-label = 'Change canvas mode'
123- variant = 'ghost'
124- className = { cn ( 'size-[20px] rounded-sm p-0' , chipHoverSurfaceClass ) }
125- >
120+ < Button aria-label = 'Change canvas mode' variant = 'quiet' size = 'icon' >
126121 < ChevronDown
127122 className = { cn ( disclosureChevronClass , isCanvasModeOpen && 'rotate-180' ) }
128123 />
You can’t perform that action at this time.
0 commit comments