Skip to content

Commit 88331dd

Browse files
committed
Use shared Button component for action buttons
Replace native button elements in the viewport panels with the centralized Button component. This enforces consistent styling and variant support for primary and secondary actions across dialogs and forms.
1 parent 47d914c commit 88331dd

File tree

1 file changed

+12
-11
lines changed

1 file changed

+12
-11
lines changed

src/lib/components/panels/Viewport.svelte

Lines changed: 12 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@
77
import AIInsightsCard from '../ui/AIInsightsCard.svelte';
88
import RuixenInsights from '../ui/RuixenInsights.svelte';
99
import DataManager from '../ui/DataManager.svelte';
10+
import Button from '../ui/Button.svelte';
1011
import EmptyState from '../ui/EmptyState.svelte';
1112
import Skeleton from '../ui/Skeleton.svelte';
1213
import { rightPanelView, uiHelpers } from '$lib/stores/ui';
@@ -295,11 +296,11 @@
295296
</h3>
296297
<p>Mark {selectedPet?.name} as passed away?</p>
297298
<div class="flex justify-end gap-2">
298-
<button class="button-secondary" onclick={() => uiHelpers.setView('dashboard')}
299-
>Cancel</button
299+
<Button variant="secondary" onclick={() => uiHelpers.setView('dashboard')}
300+
>Cancel</Button
300301
>
301-
<button
302-
class="button"
302+
<Button
303+
variant="primary"
303304
onclick={() => {
304305
if (selectedPet) {
305306
petHelpers.archive(selectedPet.id);
@@ -308,7 +309,7 @@
308309
}
309310
}
310311
uiHelpers.setView('dashboard');
311-
}}>Confirm</button
312+
}}>Confirm</Button
312313
>
313314
</div>
314315
</div>
@@ -597,16 +598,16 @@
597598

598599
<!-- Actions -->
599600
<div class="flex justify-end space-x-3">
600-
<button
601+
<Button
602+
variant="secondary"
601603
onclick={() => uiHelpers.setView('dashboard')}
602-
class="button-secondary"
603604
disabled={isSubmitting}
604605
>
605606
Cancel
606-
</button>
607-
<button
607+
</Button>
608+
<Button
609+
variant="primary"
608610
onclick={submitJournalEntry}
609-
class="button flex items-center space-x-2"
610611
disabled={!journalInput.trim() || isSubmitting}
611612
>
612613
{#if isSubmitting || $isAnalyzing}
@@ -618,7 +619,7 @@
618619
<PenTool size={16} />
619620
<span>Add Entry</span>
620621
{/if}
621-
</button>
622+
</Button>
622623
</div>
623624
</div>
624625
</div>

0 commit comments

Comments
 (0)