From 8f5dd1851a7da84ffa26c315fa00ef3741527ec1 Mon Sep 17 00:00:00 2001 From: rstubryan Date: Tue, 9 Dec 2025 18:04:33 +0700 Subject: [PATCH] refactor(FE-361): Refactor table and pagination components --- src/components/Pagination.tsx | 514 ++++++++++-------- src/components/Table.tsx | 238 ++++---- .../PurchasesPerSupplierTab.tsx | 318 ++++------- 3 files changed, 560 insertions(+), 510 deletions(-) diff --git a/src/components/Pagination.tsx b/src/components/Pagination.tsx index e47e480d..43b26d90 100644 --- a/src/components/Pagination.tsx +++ b/src/components/Pagination.tsx @@ -1,7 +1,9 @@ 'use client'; -import { ReactNode } from 'react'; +import { ChangeEventHandler, ReactNode } from 'react'; + import { Icon } from '@iconify/react'; +import Button from '@/components/Button'; import { cn } from '@/lib/helper'; @@ -17,16 +19,18 @@ const PaginationButton = ({ disabled?: boolean; onClick?: () => void; }) => ( - + ); const EtcPaginationButton = ({ @@ -48,7 +52,7 @@ const EtcPaginationButton = ({ tabIndex={0} role='button' className={cn( - 'join-item btn btn-ghost p-2.5 rounded-lg text-sm font-medium text-gray-500 aspect-square' + 'join-item btn btn-ghost p-2.5 rounded-lg! text-sm font-medium text-gray-500 aspect-square' )} > ... @@ -57,7 +61,7 @@ const EtcPaginationButton = ({