mirror of
https://seed.radicle.dev/rad:z4V1sjrXqjvFdnCUbxPFqd5p4DtH5.git
synced 2026-11-04 03:00:32 +08:00
Disable save button instead of hiding it
This commit is contained in:
@@ -344,6 +344,7 @@
|
||||
borderVariant="ghost"
|
||||
stylePadding="0.5rem 0.75rem"
|
||||
hideDiscard
|
||||
collapseActions
|
||||
placeholder="Leave a comment"
|
||||
submitActiveVariant="secondary"
|
||||
close={() => {
|
||||
|
||||
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user