From ee001e96fa62fc518e9dec8e667d19cc49d97de0 Mon Sep 17 00:00:00 2001 From: Brandon Oxendine Date: Mon, 13 Apr 2026 20:29:44 +0200 Subject: [PATCH] Use brand styling for save actions --- src/components/Comment.svelte | 1 + src/components/CommentToggleInput.svelte | 1 + src/components/ExtendedTextarea.svelte | 11 ++++++++++- src/components/Thread.svelte | 1 + src/modals/CreateIssue.svelte | 1 + 5 files changed, 14 insertions(+), 1 deletion(-) diff --git a/src/components/Comment.svelte b/src/components/Comment.svelte index 3ccc30642..0c4cd8c36 100644 --- a/src/components/Comment.svelte +++ b/src/components/Comment.svelte @@ -202,6 +202,7 @@ {emptyBodyTooltip} {disableAttachments} borderVariant="ghost" + submitVariant="secondary" submitInProgress={state === "submit"} submitCaption="Save" placeholder="Leave a comment" diff --git a/src/components/CommentToggleInput.svelte b/src/components/CommentToggleInput.svelte index 96280643f..0b9b5bc75 100644 --- a/src/components/CommentToggleInput.svelte +++ b/src/components/CommentToggleInput.svelte @@ -55,6 +55,7 @@ {rid} {placeholder} borderVariant="ghost" + submitActiveVariant="secondary" submitInProgress={state === "submit"} {focus} stylePadding="0.5rem 0.75rem" diff --git a/src/components/ExtendedTextarea.svelte b/src/components/ExtendedTextarea.svelte index 24612438a..bb39bd4ec 100644 --- a/src/components/ExtendedTextarea.svelte +++ b/src/components/ExtendedTextarea.svelte @@ -22,6 +22,8 @@ rid: string; placeholder?: string; submitCaption?: string; + submitVariant?: ComponentProps["variant"]; + submitActiveVariant?: ComponentProps["variant"]; focus?: boolean; inline?: boolean; body?: string; @@ -56,6 +58,8 @@ rid, placeholder = "Leave your comment", submitCaption = "Comment", + submitVariant = "ghost", + submitActiveVariant = undefined, focus = false, inline = false, body = $bindable(""), @@ -79,6 +83,11 @@ const attachDisabledReason = $derived( typeof attachDisabled === "string" ? attachDisabled : undefined, ); + const effectiveSubmitVariant = $derived( + body.trim().length > 0 && submitActiveVariant !== undefined + ? submitActiveVariant + : submitVariant, + ); let selectionStart = $state(body.length); let selectionEnd = $state(body.length); @@ -364,7 +373,7 @@ {preview ? "Edit" : "Preview"}