|
17 | 17 | use function Filament\Support\get_color_css_variables; |
18 | 18 |
|
19 | 19 | $colors = \Illuminate\Support\Arr::toCssStyles([ |
20 | | - get_color_css_variables($color, shades: [50, 100, 400, 500, 700, 800]), |
21 | | - ]); |
| 20 | + get_color_css_variables($getColor(), shades: [50, 100, 400, 500, 700, 800]), |
| 21 | + ]); |
22 | 22 |
|
23 | 23 | $iconClasses = \Illuminate\Support\Arr::toCssClasses([ |
24 | 24 | 'h-5 w-5 text-custom-400', |
25 | | - $iconAnimation, |
| 25 | + $getIconAnimation(), |
26 | 26 | ]); |
27 | 27 | @endphp |
28 | 28 |
|
29 | 29 | <div x-data="{}" |
30 | 30 | {{ $attributes->class([ |
31 | 31 | 'filament-simple-alert rounded-md bg-custom-50 p-4 dark:bg-custom-400/10', |
32 | | - 'ring-1 ring-custom-100 dark:ring-custom-500/70' => $border, |
| 32 | + 'ring-1 ring-custom-100 dark:ring-custom-500/70' => $getBorder(), |
33 | 33 | ]) }} |
34 | 34 | style="{{ $colors }}"> |
35 | 35 | <div class="flex gap-3"> |
36 | | - @if($icon) |
| 36 | + @if($getIcon()) |
37 | 37 | <div @class([ |
38 | 38 | 'flex-shrink-0', |
39 | | - $iconVerticalAlignment === 'start' ? 'self-start' : 'self-center', |
| 39 | + $getIconVerticalAlignment() === 'start' ? 'self-start' : 'self-center', |
40 | 40 | ])> |
41 | 41 | <x-filament::icon |
42 | | - :icon="$icon" |
43 | | - :class="$iconClasses" |
| 42 | + :icon="$getIcon()" |
| 43 | + :class="$iconClasses" |
44 | 44 | /> |
45 | 45 | </div> |
46 | 46 | @endif |
47 | 47 | <div class="items-center flex-1 md:flex md:justify-between space-y-3 md:space-y-0 md:gap-3"> |
48 | | - @if($title || $description) |
| 48 | + @if($getTitle() || $getDescription()) |
49 | 49 | <div class="space-y-0.5"> |
50 | | - @if($title) |
| 50 | + @if($getTitle()) |
51 | 51 | <p class="text-sm font-medium text-custom-800 dark:text-white"> |
52 | | - {{ $title }} |
| 52 | + {{ $getTitle() }} |
53 | 53 | </p> |
54 | 54 | @endif |
55 | | - @if($description) |
| 55 | + @if($getDescription()) |
56 | 56 | <p class="text-sm text-custom-700 dark:text-white"> |
57 | | - {{ $description }} |
| 57 | + {{ $getDescription() }} |
58 | 58 | </p> |
59 | 59 | @endif |
60 | 60 | </div> |
61 | 61 | @endif |
62 | | - @if($link || $actions) |
| 62 | + @if($getLink() || $getActions()) |
63 | 63 | <div @class([ |
64 | 64 | 'flex items-center gap-3', |
65 | | - $actionsVerticalAlignment === 'start' ? 'self-start' : 'self-center', |
| 65 | + $getActionsVerticalAlignment() === 'start' ? 'self-start' : 'self-center', |
66 | 66 | ])> |
67 | 67 | <div class="flex items-center whitespace-nowrap gap-3"> |
68 | | - @if($link) |
| 68 | + @if($getLink()) |
69 | 69 | <p class="text-sm md:mt-0 self-center"> |
70 | | - <a href="{{ $link }}" {{ $linkBlank ? 'target="_blank"' : '' }} class="whitespace-nowrap font-medium text-custom-400 hover:text-custom-500"> |
71 | | - {{ $linkLabel }} |
72 | | - <span aria-hidden="true"> →</span> |
| 70 | + <a href="{{ $getLink() }}" {{ $getLinkBlank() ? 'target="_blank"' : '' }} class="whitespace-nowrap font-medium text-custom-400 hover:text-custom-500"> |
| 71 | + {{ $getLinkLabel() }} |
| 72 | + <span aria-hidden="true"> →</span> |
73 | 73 | </a> |
74 | 74 | </p> |
75 | 75 | @endif |
76 | | - @if($actions) |
| 76 | + @if($getActions()) |
77 | 77 | <div class="gap-3 flex items-center justify-start"> |
78 | | - @foreach ($actions as $action) |
| 78 | + @foreach ($getActions() as $action) |
79 | 79 | @if ($action->isVisible()) |
80 | 80 | {{ $action }} |
81 | 81 | @endif |
|
0 commit comments