2023-07-13 11:16:24 +00:00
|
|
|
<button @disabled($disabled) {{ $attributes->merge(['class' => $defaultClass]) }}
|
|
|
|
{{ $attributes->merge(['type' => 'button']) }}
|
|
|
|
@isset($confirm)
|
2023-05-04 13:45:53 +00:00
|
|
|
x-on:click="toggleConfirmModal('{{ $confirm }}', '{{ explode('(', $confirmAction)[0] }}')"
|
2023-05-03 13:02:21 +00:00
|
|
|
@endisset
|
2023-07-13 11:16:24 +00:00
|
|
|
@isset($confirmAction)
|
2023-05-04 13:45:53 +00:00
|
|
|
x-on:{{ explode('(', $confirmAction)[0] }}.window="$wire.{{ explode('(', $confirmAction)[0] }}"
|
2023-05-18 11:26:35 +00:00
|
|
|
@endisset
|
2023-07-13 11:16:24 +00:00
|
|
|
@if ($isModal) onclick="{{ $modalId }}.showModal()" @endif>
|
2023-05-22 08:34:00 +00:00
|
|
|
|
2023-07-14 10:14:32 +00:00
|
|
|
{{ $slot }}
|
2023-07-13 11:16:24 +00:00
|
|
|
@if ($attributes->get('type') === 'submit')
|
|
|
|
<span wire:target="submit" wire:loading.delay class="loading loading-xs text-warning loading-spinner"></span>
|
|
|
|
@else
|
|
|
|
<span wire:target="{{ explode('(', $attributes->whereStartsWith('wire:click')->first())[0] }}" wire:loading.delay
|
|
|
|
class="loading loading-xs loading-spinner"></span>
|
|
|
|
@endif
|
|
|
|
</button>
|