dealhub/resources/views/components/ui/button.blade.php
kusowl 688fd02e26 chore(UI Improvements): made all pages in broker panel full width
toasts timer increased to 5s.
Add animation to the toast
Add toast for like and favorite actions
fixed the deal card design
added a opening animation to modal
2026-01-19 14:11:52 +05:30

31 lines
1.1 KiB
PHP

@props(['variant' => '', 'icon' => '', 'link' => ''])
@php
$variants = [
'neutral' => 'bg-primary-600 text-white',
'red' => 'bg-red-500 text-white',
'ghost' => 'bg-gray-200 text-gray-900'
];
$variantClass = $variants[$variant] ?? '';
@endphp
@if($link !== '')
<a {{$attributes->merge(['class' => "block px-4 py-2 rounded-lg font-medium hover:opacity-80 active:scale-80 transition-all ease-in-out duration-300 $variantClass", 'href' => $link])}}>
<div class="flex justify-center items-center space-x-2">
@if($icon !=='')
@svg("heroicon-o-$icon", 'w-5 h-5')
@endif
<p>{{$slot}}</p>
</div>
</a>
@else
<button {{$attributes->merge(['class' => "px-4 py-2 rounded-lg font-medium hover:opacity-80 active:scale-80 transition-all ease-in-out duration-300 $variantClass", 'type'=>'submit'])}}>
<div class="flex justify-center items-center space-x-2">
@if($icon !=='')
@svg("heroicon-o-$icon", 'w-5 h-5')
@endif
<p>{{$slot}}</p>
</div>
</button>
@endif