chore: move typings

This commit is contained in:
Arvid Norlin
2024-08-20 09:30:03 +02:00
parent 0453728696
commit 7e719bc475
3 changed files with 24 additions and 11 deletions

View File

@@ -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 (

View File

@@ -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%;

View File

@@ -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