{{-- Icon-only button --}} @props([ 'type' => 'button', 'variant' => 'default', 'size' => 'md', 'title' => '', 'justify' => 'center', ]) @php $justifyClass = match ($justify) { 'none' => '', 'left' => 'justify-start', 'right' => 'justify-end', default => 'justify-center', }; $base = 'inline-flex cursor-pointer items-center '.$justifyClass.' transition-all duration-200 disabled:pointer-events-none disabled:opacity-60'. ($variant != 'ghost' ? ' focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2 focus:ring-offset-background' : ' outline-none focus:outline-none'); $sizeClass = match ($size) { 'sm' => 'rounded-md p-1.5', 'lg' => 'rounded-xl p-3', default => 'rounded-lg p-2', }; $tone = match ($variant) { 'primary' => 'bg-brand text-brand-foreground hover:bg-brand/90', 'secondary' => 'border border-border bg-card text-card-foreground hover:bg-muted', 'danger' => 'bg-destructive text-destructive-foreground hover:bg-destructive/90', 'ghost' => 'bg-transparent text-foreground hover:bg-muted', default => 'bg-transparent text-foreground hover:bg-muted', }; $classes = trim("$base $sizeClass $tone"); @endphp