Disable save button instead of hiding it

This commit is contained in:
Brandon Oxendine
2026-09-09 12:37:11 +02:00
committed by Rūdolfs Ošiņš
parent 55e18a45f0
commit 8fbb408c58
2 changed files with 5 additions and 1 deletions
+1
View File
@@ -344,6 +344,7 @@
borderVariant="ghost"
stylePadding="0.5rem 0.75rem"
hideDiscard
collapseActions
placeholder="Leave a comment"
submitActiveVariant="secondary"
close={() => {
+4 -1
View File
@@ -59,6 +59,8 @@
// reason for disabling. Defaults to `false`
disableAttachments?: boolean | string;
hideDiscard?: boolean;
// If true, the whole actions row stays hidden until the body has content.
collapseActions?: boolean;
belowTextarea?: Snippet;
}
@@ -89,6 +91,7 @@
close,
disableAttachments: attachDisabled = false,
hideDiscard = false,
collapseActions = false,
belowTextarea,
}: Props = $props();
/* eslint-enable prefer-const */
@@ -469,7 +472,7 @@
{/if}
</div>
{@render belowTextarea?.()}
{#if !hideDiscard || body.trim() !== ""}
{#if !collapseActions || body.trim() !== ""}
<div class="actions">
{#if !hideDiscard}
<Button