|
1 | 1 | @props(['style' => session('flash.bannerStyle', 'success'), 'message' => session('flash.banner')])
|
2 | 2 |
|
3 | 3 | <div x-data="{{ json_encode(['show' => true, 'style' => $style, 'message' => $message]) }}"
|
4 |
| - :class="{ 'bg-indigo-500': style == 'success', 'bg-red-700': style == 'danger', 'bg-gray-500': style != 'success' && style != 'danger' }" |
| 4 | + :class="{ 'bg-indigo-500': style == 'success', 'bg-red-700': style == 'danger', 'bg-yellow-500': style == 'warning', 'bg-gray-500': style != 'success' && style != 'danger' && style != 'warning'}" |
5 | 5 | style="display: none;"
|
6 | 6 | x-show="show && message"
|
7 | 7 | x-on:banner-message.window="
|
|
12 | 12 | <div class="max-w-screen-xl mx-auto py-2 px-3 sm:px-6 lg:px-8">
|
13 | 13 | <div class="flex items-center justify-between flex-wrap">
|
14 | 14 | <div class="w-0 flex-1 flex items-center min-w-0">
|
15 |
| - <span class="flex p-2 rounded-lg" :class="{ 'bg-indigo-600': style == 'success', 'bg-red-600': style == 'danger' }"> |
| 15 | + <span class="flex p-2 rounded-lg" :class="{ 'bg-indigo-600': style == 'success', 'bg-red-600': style == 'danger', 'bg-yellow-600': style == 'warning' }"> |
16 | 16 | <svg x-show="style == 'success'" class="h-5 w-5 text-white" xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" stroke-width="1.5" stroke="currentColor">
|
17 | 17 | <path stroke-linecap="round" stroke-linejoin="round" d="M9 12.75L11.25 15 15 9.75M21 12a9 9 0 11-18 0 9 9 0 0118 0z" />
|
18 | 18 | </svg>
|
|
22 | 22 | <svg x-show="style != 'success' && style != 'danger'" class="h-5 w-5 text-white" xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" stroke-width="1.5" stroke="currentColor">
|
23 | 23 | <path stroke-linecap="round" stroke-linejoin="round" d="M11.25 11.25l.041-.02a.75.75 0 011.063.852l-.708 2.836a.75.75 0 001.063.853l.041-.021M21 12a9 9 0 11-18 0 9 9 0 0118 0zm-9-3.75h.008v.008H12V8.25z" />
|
24 | 24 | </svg>
|
| 25 | + <svg x-show="style == 'warning'" class="h-5 w-5 text-white" xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" stroke-width="1.5" stroke="currentColor"> |
| 26 | + <circle cx="12" cy="12" r="10" stroke="currentColor" stroke-width="1.5" fill="none" /> |
| 27 | + <path stroke-linecap="round" stroke-linejoin="round" d="M12 8v4m0 4v.01 0 0 " /> |
| 28 | + </svg> |
25 | 29 | </span>
|
26 | 30 |
|
27 | 31 | <p class="ms-3 font-medium text-sm text-white truncate" x-text="message"></p>
|
|
31 | 35 | <button
|
32 | 36 | type="button"
|
33 | 37 | class="-me-1 flex p-2 rounded-md focus:outline-none sm:-me-2 transition"
|
34 |
| - :class="{ 'hover:bg-indigo-600 focus:bg-indigo-600': style == 'success', 'hover:bg-red-600 focus:bg-red-600': style == 'danger' }" |
| 38 | + :class="{ 'hover:bg-indigo-600 focus:bg-indigo-600': style == 'success', 'hover:bg-red-600 focus:bg-red-600': style == 'danger', 'hover:bg-yellow-600 focus:bg-yellow-600': style == 'warning'}" |
35 | 39 | aria-label="Dismiss"
|
36 | 40 | x-on:click="show = false">
|
37 | 41 | <svg class="h-5 w-5 text-white" xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" stroke-width="1.5" stroke="currentColor">
|
|
0 commit comments