dealhub/resources/views/components/ui/button-sm.blade.php
kusowl af6d629b68 feature(external link redirection count of deal):
add a controller which increments the count for the click of external link of a deal.
2026-01-19 15:52:55 +05:30

19 lines
754 B
PHP

@props(['variant' => '', 'link' => '', 'external' => false])
@php
$variants = [
'neutral' => 'bg-primary-600 text-white',
'ghost' => 'bg-gray-100 text-black text-sm',
];
$variantClass = $variants[$variant] ?? '';
@endphp
@if($link !== '')
<a href="{{$link}}" @if($external) target="_blank" @endif {{$attributes->merge(['class' => "inline-flex px-2 py-1 text-xs rounded-md font-medium hover:opacity-80 hover: active:scale-80 transition-all duration-300 ease-in-out $variantClass"])}}>
{{$slot}}
</a>
@else
<button {{$attributes->merge(['class' => "px-2 py-1 text-xs rounded-md font-medium hover:opacity-80 hover:scale-110 active:scale-80 transition-all duration-300 ease-in-out $variantClass"])}}>
{{$slot}}
</button>
@endif