fix(settings): place save banner next to Save button
This commit is contained in:
+17
-16
@@ -198,17 +198,6 @@ export default function SettingsRoute() {
|
|||||||
</s-paragraph>
|
</s-paragraph>
|
||||||
</s-section>
|
</s-section>
|
||||||
|
|
||||||
{actionData?.ok && (
|
|
||||||
<s-banner tone="success" heading="Settings saved">
|
|
||||||
Your changes are now live and will be used for the next invoice.
|
|
||||||
</s-banner>
|
|
||||||
)}
|
|
||||||
{actionData && !actionData.ok && (
|
|
||||||
<s-banner tone="critical" heading="Please fix the highlighted errors">
|
|
||||||
Some fields below need attention before settings can be saved.
|
|
||||||
</s-banner>
|
|
||||||
)}
|
|
||||||
|
|
||||||
<Form method="post" encType="multipart/form-data">
|
<Form method="post" encType="multipart/form-data">
|
||||||
<s-section heading="Company">
|
<s-section heading="Company">
|
||||||
<s-stack direction="block" gap="base">
|
<s-stack direction="block" gap="base">
|
||||||
@@ -415,11 +404,23 @@ export default function SettingsRoute() {
|
|||||||
</s-section>
|
</s-section>
|
||||||
|
|
||||||
<s-section>
|
<s-section>
|
||||||
<s-stack direction="inline" gap="base" justifyContent="end" alignItems="center">
|
<s-stack direction="block" gap="base">
|
||||||
{isSaving ? <s-text tone="neutral">Saving…</s-text> : null}
|
{actionData?.ok && (
|
||||||
<s-button type="submit" variant="primary" {...(isSaving ? { loading: true } : {})}>
|
<s-banner tone="success" heading="Settings saved">
|
||||||
Save settings
|
Your changes are now live and will be used for the next invoice.
|
||||||
</s-button>
|
</s-banner>
|
||||||
|
)}
|
||||||
|
{actionData && !actionData.ok && (
|
||||||
|
<s-banner tone="critical" heading="Please fix the highlighted errors">
|
||||||
|
Some fields below need attention before settings can be saved.
|
||||||
|
</s-banner>
|
||||||
|
)}
|
||||||
|
<s-stack direction="inline" gap="base" justifyContent="end" alignItems="center">
|
||||||
|
{isSaving ? <s-text tone="neutral">Saving…</s-text> : null}
|
||||||
|
<s-button type="submit" variant="primary" {...(isSaving ? { loading: true } : {})}>
|
||||||
|
Save settings
|
||||||
|
</s-button>
|
||||||
|
</s-stack>
|
||||||
</s-stack>
|
</s-stack>
|
||||||
</s-section>
|
</s-section>
|
||||||
</Form>
|
</Form>
|
||||||
|
|||||||
Reference in New Issue
Block a user