lots of progress
This commit is contained in:
@@ -0,0 +1,20 @@
|
||||
@props(['type' => 'info', 'dismissible' => false])
|
||||
|
||||
@php
|
||||
$classes = [
|
||||
'success' => 'alert-success',
|
||||
'danger' => 'alert-danger',
|
||||
'warning' => 'alert-warning',
|
||||
'info' => 'alert-info',
|
||||
'primary' => 'alert-primary',
|
||||
'secondary' => 'alert-secondary',
|
||||
];
|
||||
$alertClass = $classes[$type] ?? $classes['info'];
|
||||
@endphp
|
||||
|
||||
<div {{ $attributes->merge(['class' => 'alert ' . $alertClass . ($dismissible ? ' alert-dismissible fade show' : '')]) }} role="alert">
|
||||
{{ $slot }}
|
||||
@if($dismissible)
|
||||
<button type="button" class="btn-close" data-bs-dismiss="alert" aria-label="Close"></button>
|
||||
@endif
|
||||
</div>
|
||||
Reference in New Issue
Block a user