@props([
'variant' => 'primary', // primary | accent | outline | ghost | on-dark
'size' => 'md', // md | sm
'href' => null,
'arrow' => false,
'type' => 'button',
])
@php
$classes = trim(implode(' ', [
match ($variant) {
'accent' => 'btn-accent',
'outline' => 'btn-outline',
'ghost' => 'btn-ghost',
'on-dark' => 'btn-on-dark',
default => 'btn-primary',
},
$size === 'sm' ? 'btn-sm' : '',
]));
@endphp
@if ($href)
merge(['class' => $classes]) }}>
{{ $slot }}
@if ($arrow)@endif
@else
@endif