Skip to content

Commit

Permalink
Merge pull request #4 from lara-zeus/fix-views
Browse files Browse the repository at this point in the history
set separate views for column and entry
  • Loading branch information
atmonshi authored Jan 10, 2024
2 parents 703c5f2 + 1b683a4 commit 80fbed3
Show file tree
Hide file tree
Showing 4 changed files with 42 additions and 2 deletions.
File renamed without changes.
40 changes: 40 additions & 0 deletions resources/views/popover-entry.blade.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
<div x-data class="fi-popover">
@php
$getState = $getState();
$getTrigger = $getTrigger();
$getPlacement = $getPlacement();
$getOffset = $getOffset();
$getPopOverMaxWidth = $getPopOverMaxWidth();
$getIcon = $getIcon($getState);
@endphp
<template x-ref="template">
<div class="fi-popover-content">
{{ $getContent() }}
</div>
</template>

<button
class="w-full fi-popover-trigger cursor-pointer flex items-center gap-2"
x-tooltip="{
trigger: '{{ $getTrigger }}',
placement: '{{ $getPlacement }}',
offset: @js($getOffset),
maxWidth: '{{ $getPopOverMaxWidth }}',
content: () => $refs.template.innerHTML,
appendTo: $root,
allowHTML: true,
interactive: true,
theme: $store.theme,
}">

{{ $getState }}

@if($getIcon)
<x-filament::icon
:icon="$getIcon"
class="h-5 w-5 text-gray-500 dark:text-gray-400"
/>
@endif
</button>
</div>
2 changes: 1 addition & 1 deletion src/Infolists/PopoverEntry.php
Original file line number Diff line number Diff line change
Expand Up @@ -11,5 +11,5 @@ class PopoverEntry extends Entry
use HasIcon;
use HasPopover;

protected string $view = 'zeus-popover::popover';
protected string $view = 'zeus-popover::popover-entry';
}
2 changes: 1 addition & 1 deletion src/Tables/PopoverColumn.php
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ class PopoverColumn extends Column
use HasDescription;
use HasPopover;

protected string $view = 'zeus-popover::popover';
protected string $view = 'zeus-popover::popover-column';

protected function setUp(): void
{
Expand Down

0 comments on commit 80fbed3

Please sign in to comment.