fix: loading after button text

This commit is contained in:
Andras Bacsai 2023-07-14 12:14:32 +02:00
parent 9f4342bd19
commit 48ad40dea2

View File

@ -8,11 +8,11 @@
@endisset
@if ($isModal) onclick="{{ $modalId }}.showModal()" @endif>
{{ $slot }}
@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
{{ $slot }}
</button>