2023-07-13 13:16:24 +02:00
|
|
|
<button @disabled($disabled) {{ $attributes->merge(['class' => $defaultClass]) }}
|
2023-08-11 20:19:42 +02:00
|
|
|
{{ $attributes->merge(['type' => 'button']) }}
|
|
|
|
@isset($confirm)
|
2023-08-08 11:51:36 +02:00
|
|
|
x-on:click="toggleConfirmModal('{{ $confirm }}', '{{ explode('(', $confirmAction)[0] }}')"
|
|
|
|
@endisset
|
2023-08-11 20:19:42 +02:00
|
|
|
@isset($confirmAction)
|
2023-08-08 11:51:36 +02:00
|
|
|
x-on:{{ explode('(', $confirmAction)[0] }}.window="$wire.{{ explode('(', $confirmAction)[0] }}"
|
2024-04-12 10:28:40 +02:00
|
|
|
@endisset>
|
2023-05-22 10:34:00 +02:00
|
|
|
|
2023-07-14 12:14:32 +02:00
|
|
|
{{ $slot }}
|
2024-03-22 14:47:36 +01:00
|
|
|
@if ($attributes->whereStartsWith('wire:click')->first())
|
2024-04-12 10:28:40 +02:00
|
|
|
<x-loading-on-button wire:target="{{ $attributes->whereStartsWith('wire:click')->first() }}"
|
|
|
|
wire:loading.delay />
|
|
|
|
@elseif($attributes->whereStartsWith('wire:target')->first())
|
|
|
|
<x-loading-on-button wire:target="{{ $attributes->whereStartsWith('wire:target')->first() }}"
|
|
|
|
wire:loading.delay />
|
2023-07-13 13:16:24 +02:00
|
|
|
@endif
|
|
|
|
</button>
|