We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent ef56aca commit 57bb634Copy full SHA for 57bb634
src/components/shared/pagination/Pagination.tsx
@@ -12,6 +12,9 @@ const currentPageButtonClass = twMergeEx(
12
'bg-primary-normal text-common-white'
13
)
14
15
+const getPageButtonClass = (page: number, currentPage: number): string =>
16
+ currentPage === page ? currentPageButtonClass : defaultPageButtonClass
17
+
18
export const Pagination = ({
19
currentPage,
20
pageButtons,
@@ -36,11 +39,7 @@ export const Pagination = ({
36
39
variant='text'
37
40
key={page}
38
41
onClick={() => goToPage(page)}
- className={
- currentPage === page
- ? currentPageButtonClass
42
- : defaultPageButtonClass
43
- }
+ className={getPageButtonClass(page, currentPage)}
44
>
45
{page}
46
</Button>
0 commit comments