diff --git a/docs/filament.md b/docs/filament.md index a6e1520..d6b2edf 100644 --- a/docs/filament.md +++ b/docs/filament.md @@ -4,7 +4,7 @@ Popover (tippyjs) with custom content in tables and infolist ## Features -- 🔥 trigger (click) +- 🔥 trigger (click,hover) - 🔥 placement (right) - 🔥 offset from the content - 🔥 Max Width diff --git a/docs/getting-started/installation.md b/docs/getting-started/installation.md index c92c425..36d7821 100644 --- a/docs/getting-started/installation.md +++ b/docs/getting-started/installation.md @@ -23,10 +23,10 @@ composer require lara-zeus/popover ->toggleable() // main options - ->trigger('click') // for now popover only support click! + ->trigger('click') // support click and hover ->placement('right') // for more: https://alpinejs.dev/plugins/anchor#positioning ->offset(10) // int px, for more: https://alpinejs.dev/plugins/anchor#offset - ->popOverMaxWidth('none') // todo change to classes as in filament for more: + ->popOverMaxWidth('none') ->icon('heroicon-o-chevron-right') // show custom icon // direct HTML content @@ -45,10 +45,10 @@ composer require lara-zeus/popover ```php \LaraZeus\Popover\Infolists\PopoverEntry::make('name') // main options - ->trigger('click') // for now popover only support click! + ->trigger('click') // support click and hover ->placement('right') // for more: https://alpinejs.dev/plugins/anchor#positioning ->offset(10) // int px, for more: https://alpinejs.dev/plugins/anchor#offset - ->popOverMaxWidth('none') // todo change to classes as in filament for more: + ->popOverMaxWidth('none') ->icon('heroicon-o-chevron-right') // show custom icon // direct HTML content diff --git a/docs/introduction.md b/docs/introduction.md index 1e4bea5..2b24083 100644 --- a/docs/introduction.md +++ b/docs/introduction.md @@ -10,7 +10,7 @@ weight: 1 ## features -- 🔥 trigger (click) +- 🔥 trigger (click,hover) - 🔥 placement (right) - 🔥 offset from the content - 🔥 Max Width diff --git a/resources/views/popover-column.blade.php b/resources/views/popover-column.blade.php index 785d007..c08561c 100644 --- a/resources/views/popover-column.blade.php +++ b/resources/views/popover-column.blade.php @@ -1,20 +1,27 @@ +@php + $getState = $getState(); + $getTrigger = $getTrigger(); + $getPlacement = $getPlacement(); + $getOffset = $getOffset(); + $getPopOverMaxWidth = $getPopOverMaxWidth(); + $getIcon = $getIcon($getState); + $descriptionAbove = $getDescriptionAbove(); + $descriptionBelow = $getDescriptionBelow(); + $canWrap = $canWrap(); + $getContent = $getContent(); +@endphp
{ open = true }, 200)" + @else + @click="open = ! open" + @endif > {{ $getState }} @@ -44,11 +54,9 @@ class="h-5 w-5 text-gray-500 dark:text-gray-400"