chore: move typings
This commit is contained in:
@@ -2,16 +2,17 @@ import { ChevronRightIcon } from "@/components/Icons"
|
||||
|
||||
import styles from "./pagination.module.css"
|
||||
|
||||
import {
|
||||
PaginationButtonProps,
|
||||
PaginationProps,
|
||||
} from "@/types/components/myPages/myPage/earnAndBurn"
|
||||
|
||||
function PaginationButton({
|
||||
children,
|
||||
isActive,
|
||||
handleClick,
|
||||
disabled,
|
||||
}: React.PropsWithChildren<{
|
||||
disabled: boolean
|
||||
isActive?: boolean
|
||||
handleClick: () => void
|
||||
}>) {
|
||||
}: React.PropsWithChildren<PaginationButtonProps>) {
|
||||
return (
|
||||
<button
|
||||
type={"button"}
|
||||
@@ -29,12 +30,7 @@ export default function Pagination({
|
||||
isFetching,
|
||||
handlePageChange,
|
||||
currentPage,
|
||||
}: {
|
||||
pageCount: number
|
||||
isFetching: boolean
|
||||
handlePageChange: (page: number) => void
|
||||
currentPage: number
|
||||
}) {
|
||||
}: PaginationProps) {
|
||||
const isOnFirstPage = currentPage === 1
|
||||
const isOnLastPage = currentPage === pageCount
|
||||
return (
|
||||
|
||||
@@ -13,6 +13,7 @@
|
||||
.paginationButton {
|
||||
background-color: transparent;
|
||||
border: none;
|
||||
cursor: pointer;
|
||||
height: 32px;
|
||||
width: 32px;
|
||||
font-size: var(--typography-Body-Bold-fontSize);
|
||||
@@ -24,6 +25,9 @@
|
||||
flex-shrink: 0;
|
||||
}
|
||||
|
||||
.paginationButton[disabled] {
|
||||
cursor: not-allowed;
|
||||
}
|
||||
.chevronLeft {
|
||||
transform: rotate(180deg);
|
||||
height: 100%;
|
||||
|
||||
@@ -31,6 +31,19 @@ export interface RowProps {
|
||||
transaction: Transaction
|
||||
}
|
||||
|
||||
export interface PaginationProps {
|
||||
pageCount: number
|
||||
isFetching: boolean
|
||||
handlePageChange: (page: number) => void
|
||||
currentPage: number
|
||||
}
|
||||
|
||||
export interface PaginationButtonProps {
|
||||
disabled: boolean
|
||||
isActive?: boolean
|
||||
handleClick: () => void
|
||||
}
|
||||
|
||||
export interface AwardPointsProps extends Pick<Transaction, "awardPoints"> {}
|
||||
|
||||
export interface AwardPointsVariantProps
|
||||
|
||||
Reference in New Issue
Block a user