From ec509a7b434980f21a9e27da6767d084ef5499f4 Mon Sep 17 00:00:00 2001 From: Hafid Nur Date: Thu, 27 Mar 2025 16:41:42 +0700 Subject: [PATCH] feat: Styling pagination --- .../src/molecules/pagination/pagination.tsx | 54 ++++++++++--------- 1 file changed, 28 insertions(+), 26 deletions(-) diff --git a/libs/ui/src/molecules/pagination/pagination.tsx b/libs/ui/src/molecules/pagination/pagination.tsx index 4bd82e2..949cb9a 100644 --- a/libs/ui/src/molecules/pagination/pagination.tsx +++ b/libs/ui/src/molecules/pagination/pagination.tsx @@ -1,5 +1,5 @@ import { FC, ReactElement } from 'react'; -import { LeftOutlined, RightOutlined } from '@ant-design/icons'; +import { ArrowLeftOutlined, ArrowRightOutlined } from '@ant-design/icons'; export interface PaginationProps { currentPage: number; @@ -15,7 +15,7 @@ export const Pagination: FC = ({ // Generate page numbers to display const getPageNumbers = () => { const pages = []; - const maxPagesToShow = 5; + // const maxPagesToShow = 5; // Always show first page if (currentPage > 3) { @@ -45,45 +45,47 @@ export const Pagination: FC = ({ }; return ( -
+
- {getPageNumbers().map((page, index) => - typeof page === 'number' ? ( - - ) : ( - - {page} - - ) - )} +
+ {getPageNumbers().map((page, index) => + typeof page === 'number' ? ( + + ) : ( + + {page} + + ) + )} +
);