Skip to content

Commit

Permalink
refactor: info component allow html tooltip content
Browse files Browse the repository at this point in the history
  • Loading branch information
alexbarnsley committed Dec 9, 2024
1 parent be6ec6b commit 0f602df
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion resources/views/info.blade.php
Original file line number Diff line number Diff line change
@@ -1,12 +1,18 @@
@props([
'class' => '',
'tooltip' => '',
'htmlTooltip' => null,
'type' => 'question',
'large' => false
])

<div
data-tippy-content="{{ $tooltip }}"
@if ($tooltip)
data-tippy-content="{{ $tooltip }}"
@elseif ($htmlTooltip)
data-tippy-html-content="{{ $htmlTooltip }}"
@endif

aria-label="{{ $tooltip }}"
class="inline-block cursor-pointer {{ $large ? 'p-1.5' : 'p-1' }} transition-default rounded-full bg-theme-primary-100 text-theme-primary-600 dark:bg-theme-secondary-800 dark:text-theme-secondary-600 hover:text-white hover:bg-theme-primary-700 dark:hover:text-theme-secondary-800 dark:hover:bg-theme-secondary-600 outline-none focus-visible:ring-2 focus-visible:ring-theme-primary-500 {{ $class }}"
tabindex="0"
Expand Down

0 comments on commit 0f602df

Please sign in to comment.