Skip to content

Commit e8621e1

Browse files
Bill LeoutsakosBill Leoutsakos
authored andcommitted
fix(workflow): match deploy resource action styling
1 parent d1e25d3 commit e8621e1

2 files changed

Lines changed: 12 additions & 5 deletions

File tree

apps/sim/app/workspace/[workspaceId]/w/[workflowId]/components/panel/components/deploy/deploy.test.tsx

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ vi.mock('@sim/emcn', () => ({
3636
}))
3737

3838
vi.mock('@sim/emcn/icons', () => ({
39-
Rocket: () => <span data-testid='rocket-icon' />,
39+
Upload: () => <span data-testid='upload-icon' />,
4040
}))
4141

4242
vi.mock(
@@ -141,7 +141,8 @@ describe('Deploy compact mode', () => {
141141
const button = container.querySelector('button')
142142
expect(button?.getAttribute('aria-label')).toBe('Deploy')
143143
expect(button?.className).toContain('resource-action')
144-
expect(container.querySelector('[data-testid="rocket-icon"]')).not.toBeNull()
144+
expect(container.querySelector('[data-testid="upload-icon"]')).not.toBeNull()
145+
expect(button?.getAttribute('variant')).toBe('subtle')
145146
expect(container.textContent).not.toContain('DeployLiveUpdate')
146147
})
147148

apps/sim/app/workspace/[workspaceId]/w/[workflowId]/components/panel/components/deploy/deploy.tsx

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
import { useState } from 'react'
44
import { Button, cn, Tooltip } from '@sim/emcn'
5-
import { Rocket } from '@sim/emcn/icons'
5+
import { Upload } from '@sim/emcn/icons'
66
import { DeployModal } from '@/app/workspace/[workspaceId]/w/[workflowId]/components/panel/components/deploy/components/deploy-modal/deploy-modal'
77
import {
88
useChangeDetection,
@@ -133,13 +133,19 @@ export function Deploy({
133133
<Button
134134
className={cn(compact ? 'h-[30px]' : 'h-[30px] gap-1.5 px-2.5', className)}
135135
variant={
136-
isRegistryLoading ? 'active' : changeDetected || !isDeployed ? 'tertiary' : 'active'
136+
compact
137+
? 'subtle'
138+
: isRegistryLoading
139+
? 'active'
140+
: changeDetected || !isDeployed
141+
? 'tertiary'
142+
: 'active'
137143
}
138144
onClick={onDeployClick}
139145
disabled={isRegistryLoading || isDisabled}
140146
aria-label={compact ? buttonLabel : undefined}
141147
>
142-
{compact ? <Rocket className='size-[16px] text-[var(--text-icon)]' /> : buttonLabel}
148+
{compact ? <Upload className='size-[16px] text-[var(--text-icon)]' /> : buttonLabel}
143149
</Button>
144150
</span>
145151
</Tooltip.Trigger>

0 commit comments

Comments
 (0)