Files
bedrock/web/app/themes/badegg/resources/views/components/alert.blade.php
Steve Ross 76520e58d2 Add 'web/app/themes/badegg/' from commit '2b425fd2ea8083ef47852429a353e1afc4e93bf8'
git-subtree-dir: web/app/themes/badegg
git-subtree-mainline: 272b0f6525
git-subtree-split: 2b425fd2ea
2025-11-22 17:26:50 +00:00

16 lines
365 B
PHP

@props([
'type' => null,
'message' => null,
])
@php($class = match ($type) {
'success' => 'text-green-50 bg-green-400',
'caution' => 'text-yellow-50 bg-yellow-400',
'warning' => 'text-red-50 bg-red-400',
default => 'text-indigo-50 bg-indigo-400',
})
<div {{ $attributes->merge(['class' => "px-2 py-1 {$class}"]) }}>
{!! $message ?? $slot !!}
</div>