Skip to content

Commit 8c0e265

Browse files
Update button styles (#179)
Warning button is styled similarly to a secondary button. The white background from secondary-like buttons has been removed.
1 parent ff03c57 commit 8c0e265

File tree

2 files changed

+10
-7
lines changed

2 files changed

+10
-7
lines changed

src/components/StandardButton.svelte

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -43,21 +43,20 @@
4343
'hover:bg-brand-600 hover:border-brand-600 active:bg-brand-700 active:border-brand-700',
4444
},
4545
secondary: {
46-
base: 'font-bold rounded-4xl bg-white text-brand-700 border-solid border-2 border-brand-500',
46+
base: 'font-bold rounded-4xl text-brand-700 border-solid border-2 border-brand-500',
4747
enabled: 'hover:border-brand-600 active:border-brand-700 active:bg-brand-50',
4848
},
4949
warning: {
50-
base: 'font-bold rounded-4xl bg-red-600 text-white border-solid border-2 border-red-600',
51-
enabled:
52-
'hover:bg-red-700 hover:border-red-700 active:bg-red-800 active:border-red-800',
50+
base: 'font-bold rounded-4xl text-red-600 border-solid border-2 border-red-600',
51+
enabled: 'hover:border-red-700 active:border-red-700 active:bg-red-50',
5352
},
5453
};
5554
</script>
5655

5756
<div class="grid grid-cols-1 place-items-center">
5857
<button
5958
{disabled}
60-
class="{classes[type].base} {disabled
59+
class="{$$restProps.class || ''} {classes[type].base} {disabled
6160
? ''
6261
: classes[type].enabled} outline-none disabled:opacity-60 {type === 'link'
6362
? ''

src/components/bottom/ConnectedLiveGraphButtons.svelte

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,7 @@
3030
<!-- Output MB is not in the connection process -->
3131
<StandardButton
3232
onClick={handleOutputDisconnectClick}
33+
class="bg-white"
3334
type="secondary"
3435
size="small">{$t('menu.model.disconnect')}</StandardButton>
3536
{:else}
@@ -43,8 +44,11 @@
4344
<StandardButton onClick={startConnectionProcess} type="primary" size="small"
4445
>{$t('footer.connectButton')}</StandardButton>
4546
{:else}
46-
<StandardButton onClick={handleInputDisconnectClick} type="secondary" size="small"
47-
>{$t('footer.disconnectButton')}</StandardButton>
47+
<StandardButton
48+
onClick={handleInputDisconnectClick}
49+
class="bg-white"
50+
type="secondary"
51+
size="small">{$t('footer.disconnectButton')}</StandardButton>
4852
{/if}
4953
</div>
5054
</div>

0 commit comments

Comments
 (0)