Skip to content

Commit 9175627

Browse files
authored
fix: pagination for darkmode (#507)
1 parent 75ad596 commit 9175627

File tree

2 files changed

+6
-3
lines changed

2 files changed

+6
-3
lines changed

src/lib/paginations/Pagination.svelte

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,9 @@
2828
<nav aria-label="Page navigation">
2929
<ul class={classNames(ulClass, table && 'divide-x divide-gray-700', $$props.class)}>
3030
<li>
31-
<PaginationItem on:click={previous} class={table ? 'rounded-l' : 'rounded-l-lg'}>
31+
<PaginationItem
32+
on:click={previous}
33+
class={classNames(normalClass, table ? 'rounded-l' : 'rounded-l-lg')}>
3234
<slot name="prev">Previous</slot>
3335
</PaginationItem>
3436
</li>
@@ -52,7 +54,7 @@
5254
</li>
5355
{/each}
5456
<li>
55-
<PaginationItem on:click={next} class={table ? 'rounded-r' : 'rounded-r-lg'}>
57+
<PaginationItem on:click={next} class={classNames(normalClass, table ? 'rounded-r' : 'rounded-r-lg')}>
5658
<slot name="next">Next</slot>
5759
</PaginationItem>
5860
</li>

src/lib/paginations/PaginationItem.svelte

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,8 @@
55
export let href: string | undefined = undefined;
66
export let active: boolean = false;
77
export let activeClass: string = '';
8-
export let normalClass: string = '';
8+
export let normalClass: string =
9+
'text-gray-500 bg-white hover:bg-gray-100 hover:text-gray-700 dark:bg-gray-800 dark:border-gray-700 dark:text-gray-400 dark:hover:bg-gray-700 dark:hover:text-white';
910
1011
const group = getContext('group');
1112
const table = getContext('table');

0 commit comments

Comments
 (0)