@props([ 'variant' => 'primary', 'size' => 'md', 'tag' => 'button', 'href' => null, 'icon' => null, ]) @php $classes = 'btn btn-'.$size.' btn-'.$variant; $element = $href ? 'a' : $tag; @endphp <{{ $element }} @if ($href) href="{{ $href }}" @endif {{ $attributes->merge(['class' => $classes]) }} > @if ($icon) {!! $icon !!} @endif {{ $slot }}