-
-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
4 changed files
with
86 additions
and
38 deletions.
There are no files selected for viewing
48 changes: 25 additions & 23 deletions
48
packages/expiry/resources/views/widgets/my-expiry.blade.php
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,26 +1,28 @@ | ||
@php | ||
$tabs = $this->getTabs(); | ||
$activeTab = request('activeTab', 'all'); | ||
@endphp | ||
<div class="grid flex-1 auto-cols-fr gap-y-8"> | ||
<div class="flex flex-col gap-y-6"> | ||
<nav class="fi-tabs flex max-w-full gap-x-1 overflow-x-auto mx-auto rounded-xl bg-white p-2 shadow-sm ring-1 ring-gray-950/5 dark:bg-gray-900 dark:ring-white/10" role="tablist"> | ||
@foreach ($tabs as $tab) | ||
<button wire:click="switchTab('{{ $tab->key }}')" | ||
class="fi-tabs-item group flex items-center gap-x-2 rounded-lg px-3 py-2 text-sm font-medium outline-none transition duration-75 {{ $activeTab === $tab->key ? 'fi-active fi-tabs-item-active bg-gray-50 dark:bg-white/5' : 'hover:bg-gray-50 focus-visible:bg-gray-50 dark:hover:bg-white/5 dark:focus-visible:bg-white/5' }}" | ||
aria-selected="{{ $activeTab === $tab->key ? 'true' : 'false' }}" | ||
role="tab"> | ||
@svg($tab->icon, 'fi-tabs-item-icon h-5 w-5 shrink-0 transition duration-75 ' . ($activeTab === $tab->key ? 'text-primary-600 dark:text-primary-400' : 'text-gray-400 dark:text-gray-500')) | ||
<span class="fi-tabs-item-label transition duration-75 {{ $activeTab === $tab->key ? 'text-primary-600 dark:text-primary-400' : 'text-gray-500 group-hover:text-gray-700 group-focus-visible:text-gray-700 dark:text-gray-400 dark:group-hover:text-gray-200 dark:group-focus-visible:text-gray-200' }}"> | ||
{{ $tab->label }} | ||
</span> | ||
<span class="fi-badge flex items-center justify-center gap-x-1 rounded-md text-xs font-medium ring-1 ring-inset px-1.5 min-w-[theme(spacing.5)] py-0.5 tracking-tight fi-color-custom {{ $activeTab === $tab->key ? 'bg-custom-50 text-custom-600 ring-custom-600/10 dark:bg-custom-400/10 dark:text-custom-400 dark:ring-custom-400/30' : 'bg-custom-50 text-custom-600 ring-custom-600/10 dark:bg-custom-400/10 dark:text-custom-400 dark:ring-custom-400/30' }}"> | ||
<span class="grid"> | ||
<span class="truncate"> | ||
{{ $tab->badge }} | ||
</span> | ||
</span> | ||
</span> | ||
</button> | ||
@endforeach | ||
</nav> | ||
|
||
<div> | ||
<ul class="nav nav-tabs"> | ||
@foreach ($tabs as $tabKey => $tab) | ||
<li class="nav-item"> | ||
<a class="nav-link {{ $activeTab === $tabKey ? 'active' : '' }}" | ||
href="?activeTab={{ $tabKey }}"> | ||
<i class="{{ $tab->getIcon() }}"></i> {{ $tab->getLabel() }} | ||
<span class="badge">{{ $tab->getBadge() }}</span> | ||
</a> | ||
</li> | ||
@endforeach | ||
</ul> | ||
|
||
<div class="tab-content"> | ||
@foreach ($tabs as $tabKey => $tab) | ||
<div class="tab-pane {{ $activeTab === $tabKey ? 'active' : '' }}"> | ||
{{ $this->table }} | ||
</div> | ||
@endforeach | ||
<div> | ||
{{ $this->table }} | ||
</div> | ||
</div> | ||
</div> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters