1.3.0 • Published 5 months ago
@illa-design/pagination v1.3.0
Pagination
Pagination is used to show content in pages and can control the internal capacity of each page.
Installation
yarn add @illa-design/pagination
Import component
import { Pagination } from "@illa-design/pagination"
API
Pagination Basic Properties
Props | Desc | Type | Default |
---|---|---|---|
currentPage | Set current page | number | - |
pageSize | Set capacity of each page | number | - |
total | Total number of content | number | - |
defaultCurrent | Set default current page | number | 1 |
defaultPageSize | Set default capacity of each page | number | 10 |
disabled | Whether to disable the component | boolean | - |
hideOnSinglePage | Whether to hide when only one page | boolean | true |
size | Set size | "small" | "medium" | "large" | "medium" |
showTotal | whether to show the total number of content | boolean | ((total: number, range: number[]) => ReactNode) | - |
sizeCanChange | whether to show options of change page capacity | boolean | true |
sizeOptions | Set options of change page capacity | number[] | 10,20,30,40,50 |
simple | whether to show simple style | boolean | - |
showJumper | Whether to show the page jumper | boolean | - |
prevIcon | Set previous page icon | ReactNode | - |
nextIcon | Set next page icon | ReactNode | - |
moreIcon | Set more page icon | ReactNode | - |
Pagination Events
Props | Desc | Type | Default |
---|---|---|---|
onChange | Callback when the current page is changed | (pageNumber: number, pageSize: number) => void | - |
onPageSizeChange | Callback when the pageSize is changed | (size: number, current: number) => void | - |
Example
Basic usage
<Pagination total={200} />
Set capacity of each page can be change
<Pagination defaultCurrent={5} total={200} sizeCanChange />
Set jumper
<Pagination total={200} showJumper />
Set Pagination's size
<Pagination size="small" total={50} showTotal showJumper sizeCanChange />
Show total number of content
<Pagination showTotal total={50} style={{ marginBottom: 20 }} />
Show all of Configuration item
<Pagination showTotal total={200} showJumper sizeCanChange />
1.2.0
5 months ago
1.3.0
5 months ago
1.0.29
10 months ago
1.0.28
10 months ago
1.0.27
11 months ago
1.0.31
9 months ago
1.0.30
10 months ago
1.1.0
8 months ago
1.0.22
1 year ago
1.0.21
1 year ago
1.0.26
12 months ago
1.0.25
12 months ago
1.0.24
1 year ago
1.0.23
1 year ago
1.0.19
1 year ago
1.0.18
1 year ago
1.0.17
1 year ago
1.0.20
1 year ago
1.0.16
1 year ago
1.0.15
1 year ago
1.0.14
1 year ago
1.0.9
1 year ago
1.0.8
1 year ago
1.0.7
1 year ago
1.0.6
2 years ago
1.0.11
1 year ago
1.0.10
1 year ago
1.0.13
1 year ago
1.0.12
1 year ago
1.0.5
2 years ago
1.0.4
2 years ago
1.0.3
2 years ago
1.0.2
2 years ago
1.0.1
2 years ago
1.0.0
2 years ago
0.0.10
2 years ago
0.0.11
2 years ago
0.0.12
2 years ago
0.0.13
2 years ago
0.0.14
2 years ago
0.0.15
2 years ago
0.0.9
2 years ago
0.0.16
2 years ago
0.0.17
2 years ago
0.0.8
2 years ago
0.0.5
2 years ago
0.0.4
2 years ago
0.0.7
2 years ago
0.0.6
2 years ago
0.0.3
2 years ago
0.0.2
2 years ago
0.0.1
2 years ago