@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 !== '') 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])}}> @if($icon !=='') @svg("heroicon-o-$icon", 'w-5 h-5') @endif {{$slot}} @else 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'])}}> @if($icon !=='') @svg("heroicon-o-$icon", 'w-5 h-5') @endif {{$slot}} @endif
{{$slot}}