gps_system/resources/views/flux/with-tooltip.blade.php
sackey 6b878bb0a0
Some checks failed
linter / quality (push) Has been cancelled
tests / ci (push) Has been cancelled
Initial commit
2025-09-12 16:19:56 +00:00

28 lines
663 B
PHP

@pure
@php
extract(Flux::forwardedAttributes($attributes, [
'tooltipPosition',
'tooltipKbd',
'tooltip',
]));
@endphp
@php $tooltipPosition = $tooltipPosition ??= $attributes->pluck('tooltip:position'); @endphp
@php $tooltipKbd = $tooltipKbd ??= $attributes->pluck('tooltip:kbd'); @endphp
@php $tooltip = $tooltip ??= $attributes->pluck('tooltip'); @endphp
@props([
'tooltipPosition' => 'top',
'tooltipKbd' => null,
'tooltip' => null,
])
<?php if ($tooltip): ?>
<flux:tooltip :content="$tooltip" :position="$tooltipPosition" :kbd="$tooltipKbd">
{{ $slot }}
</flux:tooltip>
<?php else: ?>
{{ $slot }}
<?php endif; ?>