design: make error containers not look awful

This commit is contained in:
Xylight committed 2025-10-17 19:18:18 -07:00
1 parent ad9236f43b
commit b6374e5292
1 file changed
+24 -4
+24 -4
View File
@@ -51,13 +51,13 @@
easing: expoOut, easing: expoOut,
}} }}
out:fly={{ y: -8, duration: 400, opacity: 0, easing: expoOut }} out:fly={{ y: -8, duration: 400, opacity: 0, easing: expoOut }}
class="bg-red-400/10 border border-red-500/30 text-red-900 dark:text-red-50 rounded-2xl p-4" class="error-container"
> >
<Icon <Icon
src={ExclamationTriangle} src={ExclamationTriangle}
size="32" size="20"
mini micro
class="inline-block rounded-lg bg-red-500 p-1.5 text-white clear-both float-left mr-2" class="inline-block rounded-lg clear-both float-left mr-2"
/> />
{#each scopedErrors as error} {#each scopedErrors as error}
<p>{error.message}</p> <p>{error.message}</p>
@@ -65,3 +65,23 @@
</div> </div>
</div> </div>
{/if} {/if}
<style>
@reference '../../../app.css';
.error-container {
background: linear-gradient(
to top,
--alpha(var(--color-red-400) / 10%),
--alpha(var(--color-red-500) / 10%)
);
border-radius: var(--radius-2xl);
padding: calc(var(--spacing) * 2.5) calc(var(--spacing) * 3);
color: var(--color-red-900);
border: 1px solid --alpha(var(--color-red-300) / 30%);
font-size: var(--text-sm);
@variant dark {
color: var(--color-red-300);
}
}
</style>