Merge pull request #15553 from thaqebon/icon-btn-title

Conditionally set title attribute based on tooltip of icon button
This commit is contained in:
Dan Harrin
2025-02-08 10:47:48 +00:00
committed by GitHub
@@ -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])
}}