diff --git a/packages/support/resources/views/components/icon-button.blade.php b/packages/support/resources/views/components/icon-button.blade.php index 6ddfa2782a..7a57170c0b 100644 --- a/packages/support/resources/views/components/icon-button.blade.php +++ b/packages/support/resources/views/components/icon-button.blade.php @@ -147,9 +147,9 @@ 'wire:loading.attr' => 'disabled', 'wire:target' => ($hasLoadingIndicator && $loadingIndicatorTarget) ? $loadingIndicatorTarget : null, ], escape: false) - ->merge([ - 'title' => $label, - ], escape: true) + ->when(! $hasTooltip, function ($attributes) use ($label) { + return $attributes->merge(['title' => $label], escape: true); + }) ->class([$buttonClasses]) ->style([$buttonStyles]) }} @@ -212,9 +212,9 @@ @endif {{ $attributes - ->merge([ - 'title' => $label, - ], escape: true) + ->when(! $hasTooltip, function ($attributes) use ($label) { + return $attributes->merge(['title' => $label], escape: true); + }) ->class([$buttonClasses]) ->style([$buttonStyles]) }}