CSS cleanup
This commit is contained in:
24
src/lib/components/ActionStatus.svelte
Normal file
24
src/lib/components/ActionStatus.svelte
Normal file
@@ -0,0 +1,24 @@
|
||||
<script lang="ts" module>
|
||||
export interface Status {
|
||||
tone: 'ok' | 'danger';
|
||||
text: string;
|
||||
}
|
||||
</script>
|
||||
|
||||
<script lang="ts">
|
||||
/**
|
||||
* A form's result, shown after its buttons in the same row. It's always there (empty when
|
||||
* there's nothing to say), so a message appearing never moves anything.
|
||||
*/
|
||||
let { status }: { status: Status | null | undefined } = $props();
|
||||
</script>
|
||||
|
||||
<p class="action-status small tone-{status?.tone ?? 'ok'}" role="status">{status?.text ?? ''}</p>
|
||||
|
||||
<style>
|
||||
.action-status {
|
||||
flex: 1 1 14rem;
|
||||
min-width: 0;
|
||||
color: var(--tone);
|
||||
}
|
||||
</style>
|
||||
Reference in New Issue
Block a user