Skip to content

Commit

Permalink
enhance pagination layout
Browse files Browse the repository at this point in the history
  • Loading branch information
luanfreitasdev committed May 25, 2024
1 parent 3ba52e9 commit eb945e8
Showing 1 changed file with 16 additions and 7 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,12 @@ class="items-center justify-between sm:flex gap-2"
>
<div class="items-center justify-between w-full sm:flex-1 sm:flex">
@if ($recordCount === 'full')
<div class="mr-3">
<div
class="mr-2 leading-5 text-center text-pg-primary-700 text-md dark:text-pg-primary-300 sm:text-right">
{{ $paginator->hasPages() }}
<div @class(['mr-3' => $paginator->hasPages()])>
<div @class([
'mr-2' => $paginator->hasPages(),
'leading-5 text-center text-pg-primary-700 text-md dark:text-pg-primary-300 sm:text-right',
])>
{{ trans('livewire-powergrid::datatable.pagination.showing') }}
<span class="font-semibold firstItem">{{ $paginator->firstItem() }}</span>
{{ trans('livewire-powergrid::datatable.pagination.to') }}
Expand All @@ -18,8 +21,11 @@ class="mr-2 leading-5 text-center text-pg-primary-700 text-md dark:text-pg-prima
</div>
</div>
@elseif($recordCount === 'short')
<div class="mr-3">
<p class="mr-2 leading-5 text-center text-pg-primary-700 text-md dark:text-pg-primary-300">
<div @class(['mr-3' => $paginator->hasPages()])>
<p @class([
'mr-2' => $paginator->hasPages(),
'leading-5 text-center text-pg-primary-700 text-md dark:text-pg-primary-300 sm:text-right',
])>
<span class="font-semibold firstItem"> {{ $paginator->firstItem() }}</span>
-
<span class="font-semibold lastItem"> {{ $paginator->lastItem() }}</span>
Expand All @@ -28,8 +34,11 @@ class="mr-2 leading-5 text-center text-pg-primary-700 text-md dark:text-pg-prima
</p>
</div>
@elseif($recordCount === 'min')
<div class="mr-3">
<p class="mr-2 leading-5 text-center text-pg-primary-700 text-md dark:text-pg-primary-300">
<div @class(['mr-3' => $paginator->hasPages()])>
<p @class([
'mr-2' => $paginator->hasPages(),
'leading-5 text-center text-pg-primary-700 text-md dark:text-pg-primary-300 sm:text-right',
])>
<span class="font-semibold firstItem"> {{ $paginator->firstItem() }}</span>
-
<span class="font-semibold lastItem"> {{ $paginator->lastItem() }}</span>
Expand Down

0 comments on commit eb945e8

Please sign in to comment.