Spaces:
Sleeping
Sleeping
File size: 610 Bytes
1fff71f |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 |
<script lang="ts">
// Error alert component with Bootstrap alert styling
export let message: string;
export let dismissible: boolean = true;
export let onDismiss: (() => void) | null = null;
function handleDismiss() {
if (onDismiss) {
onDismiss();
}
}
</script>
<div class="alert alert-danger {dismissible ? 'alert-dismissible' : ''} fade show" role="alert">
<i class="bi bi-exclamation-triangle-fill me-2"></i>
{message}
{#if dismissible}
<button
type="button"
class="btn-close"
data-bs-dismiss="alert"
aria-label="Close"
on:click={handleDismiss}
></button>
{/if}
</div>
|