Skip to content

Commit a837f8b

Browse files
committed
🏷️ Improve Pagination component event type
1 parent e40bb35 commit a837f8b

File tree

1 file changed

+7
-2
lines changed

1 file changed

+7
-2
lines changed

src/components/Pagination/pagination.ts

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,10 @@
11
import type { ButtonProps } from '../Button/button'
22

3+
export type PaginationEventType = {
4+
page: number
5+
label?: string | number | undefined
6+
}
7+
38
export type PaginationProps = {
49
type?: 'arrows' | 'dots' | null
510
showChevrons?: boolean
@@ -22,9 +27,9 @@ export type PaginationProps = {
2227
}
2328

2429
export type SveltePaginationProps = {
25-
onChange?: (event: any) => void
30+
onChange?: (event: PaginationEventType) => void
2631
} & PaginationProps
2732

2833
export type ReactPaginationProps = {
29-
onChange?: (event: any) => void
34+
onChange?: (event: PaginationEventType) => void
3035
} & PaginationProps

0 commit comments

Comments
 (0)