dealhub/resources/views/components/ui/alert.blade.php
kusowl ccb5a2ed5e refactor: consolidate alert components and improve functionality
- replaced `alert-error` and `alert-success` components with a single reusable `alert` component
- added JS functionality for dismissible alerts
- updated related views to use the new `alert` component
- adjusted broker profile logic to display initials and verification status dynamically
- refactored morph relations from `type` to `role`
- enhanced image preview behavior for file inputs
- made broker migration fields nullable and added safeguards against registration errors
- Added confirmation when a user wants delete deal
- Add dynamic initials for user profile picture
- make image file name non-overidding with timestamp
2026-01-14 12:19:20 +05:30

22 lines
587 B
PHP

@props(['variant' => 'neutral'])
@php
$variants = [
'neutral' => 'bg-black text-white',
'success' => 'bg-green-100 text-green-950',
'error' => 'bg-red-100 text-red-950'
];
$variantClasses = $variants[$variant];
@endphp
<div class="alert flex items-center space-x-4 py-2 px-4 rounded-lg text-xs font-bold {{$variantClasses}} ">
<div class="flex-1">
{{$slot}}
</div>
<div>
<x-ui.button-sm onclick="removeAlert(this)">
<x-heroicon-o-x-mark class="w-4"/>
</x-ui.button-sm>
</div>
</div>
@vite('resources/js/alert.js')