Skip to content

Commit

Permalink
Merge pull request #893 from livewire/add-toggleable-tooltip
Browse files Browse the repository at this point in the history
Add `toggleable` prop to tooltip
  • Loading branch information
calebporzio authored Dec 19, 2024
2 parents 7dfe89f + 6851d5f commit f330fb6
Showing 1 changed file with 17 additions and 6 deletions.
23 changes: 17 additions & 6 deletions stubs/resources/views/flux/tooltip/index.blade.php
Original file line number Diff line number Diff line change
Expand Up @@ -4,12 +4,23 @@
'align' => 'center',
'content' => null,
'kbd' => null,
'toggleable' => null,
])

<ui-tooltip position="{{ $position }} {{ $align }}" {{ $attributes }} data-flux-tooltip @if ($interactive) interactive @endif>
{{ $slot }}
<?php if ($toggleable): ?>
<ui-dropdown position="{{ $position }} {{ $align }}" {{ $attributes }} data-flux-tooltip>
{{ $slot }}

<?php if ($content !== null): ?>
<flux:tooltip.content :$kbd>{{ $content }}</flux:tooltip.content>
<?php endif; ?>
</ui-tooltip>
<?php if ($content !== null): ?>
<flux:tooltip.content :$kbd>{{ $content }}</flux:tooltip.content>
<?php endif; ?>
</ui-dropdown>
<?php else: ?>
<ui-tooltip position="{{ $position }} {{ $align }}" {{ $attributes }} data-flux-tooltip @if ($interactive) interactive @endif>
{{ $slot }}

<?php if ($content !== null): ?>
<flux:tooltip.content :$kbd>{{ $content }}</flux:tooltip.content>
<?php endif; ?>
</ui-tooltip>
<?php endif; ?>

0 comments on commit f330fb6

Please sign in to comment.