@props([
'color' => 'primary',
'darkMode' => false,
'disabled' => false,
'icon' => null,
'keyBindings' => null,
'label' => null,
'tag' => 'button',
'tooltip' => null,
'type' => 'button',
])
@php
$buttonClasses = [
'flex items-center justify-center w-10 h-10 rounded-full hover:bg-gray-500/5 focus:outline-none filament-icon-button',
'text-primary-500 focus:bg-primary-500/10' => $color === 'primary',
'text-danger-500 focus:bg-danger-500/10' => $color === 'danger',
'text-gray-500 focus:bg-gray-500/10' => $color === 'secondary',
'text-success-500 focus:bg-success-500/10' => $color === 'success',
'text-warning-500 focus:bg-warning-500/10' => $color === 'warning',
'dark:hover:bg-gray-300/5' => $darkMode,
'opacity-70 cursor-not-allowed pointer-events-none' => $disabled,
];
$iconClasses = 'w-5 h-5 filament-icon-button-icon';
@endphp
@if ($tag === 'button')
@elseif ($tag === 'a')
class($buttonClasses) }}
>
@if ($label)
{{ $label }}
@endif
@endif