Skip to content

Commit a18df2a

Browse files
committed
prettier code and auto fix eslint
1 parent ace0392 commit a18df2a

File tree

11 files changed

+459
-421
lines changed

11 files changed

+459
-421
lines changed

HISTORY.md

Lines changed: 54 additions & 79 deletions
Original file line numberDiff line numberDiff line change
@@ -1,128 +1,103 @@
1-
2.0.0
2-
==================
1+
# 2.0.0
32

4-
* Remove prop-types and react-lifecycles-compat
3+
- Remove prop-types and react-lifecycles-compat
54

6-
1.20.0
7-
==================
5+
# 1.20.0
86

9-
* Add locale `ms_MY`
7+
- Add locale `ms_MY`
108

11-
1.19.0
12-
==================
9+
# 1.19.0
1310

14-
* Support Latvian localization
11+
- Support Latvian localization
1512

16-
1.18.0
17-
==================
13+
# 1.18.0
1814

19-
* Support `disabled`
15+
- Support `disabled`
2016

21-
1.17.0
22-
==================
17+
# 1.17.0
2318

24-
* Add `prevIcon`, `nextIcon`, `jumpPrevIcon`, `jumpNextIcon`.
19+
- Add `prevIcon`, `nextIcon`, `jumpPrevIcon`, `jumpNextIcon`.
2520

26-
1.16.1
27-
==================
21+
# 1.16.1
2822

29-
* Add locale `sl_SI`. #130
23+
- Add locale `sl_SI`. #130
3024

31-
1.16.0
32-
==================
25+
# 1.16.0
3326

34-
* Add locale `id_ID`
35-
* Add prop `showPrevNextJumpers`
27+
- Add locale `id_ID`
28+
- Add prop `showPrevNextJumpers`
3629

37-
1.15.2
38-
==================
30+
# 1.15.2
3931

40-
* Add locale `tr_TR`.
32+
- Add locale `tr_TR`.
4133

42-
1.12.0
43-
==================
34+
# 1.12.0
4435

45-
* `itemRender(current, type)` => `itemRender(current, type, element): element`.
36+
- `itemRender(current, type)` => `itemRender(current, type, element): element`.
4637

47-
1.11.0
48-
==================
38+
# 1.11.0
4939

50-
* Add `goButton`.
40+
- Add `goButton`.
5141

52-
1.10.0
53-
==================
42+
# 1.10.0
5443

55-
* Add `itemRender`.
44+
- Add `itemRender`.
5645

57-
1.9.0
58-
==================
46+
# 1.9.0
5947

60-
* Add keyboard support
61-
* Add es folder.
48+
- Add keyboard support
49+
- Add es folder.
6250

63-
1.8.0
64-
==================
51+
# 1.8.0
6552

66-
* Add locale `zh_TW`.
67-
* Add `showTitle`.
53+
- Add locale `zh_TW`.
54+
- Add `showTitle`.
6855

69-
1.7.5
70-
==================
56+
# 1.7.5
7157

72-
* Add locale `sk_SK(Slovak)`.
58+
- Add locale `sk_SK(Slovak)`.
7359

74-
1.7.4
75-
==================
60+
# 1.7.4
7661

77-
* Add locale `et_EE(Estonian)`.
62+
- Add locale `et_EE(Estonian)`.
7863

79-
1.7.3
80-
==================
64+
# 1.7.3
8165

82-
* Add locale `Czech`.
66+
- Add locale `Czech`.
8367

84-
1.7.2
85-
==================
68+
# 1.7.2
8669

87-
* Add locale `ko_KR(Korean)`.
70+
- Add locale `ko_KR(Korean)`.
8871

89-
1.7.1
90-
==================
72+
# 1.7.1
9173

92-
* Add locale `ca_ES (Catalan)`.
74+
- Add locale `ca_ES (Catalan)`.
9375

94-
1.7.0
95-
==================
76+
# 1.7.0
9677

97-
* support `showLessItems`. #55
98-
* Add `pageSize` as onChange's second argument.
78+
- support `showLessItems`. #55
79+
- Add `pageSize` as onChange's second argument.
9980

100-
1.6.0
101-
==================
81+
# 1.6.0
10282

103-
* Add `range` as showTotal's second argument.
83+
- Add `range` as showTotal's second argument.
10484

105-
1.5.5 / 2016-09-01
106-
==================
85+
# 1.5.5 / 2016-09-01
10786

108-
* Fix #34
87+
- Fix #34
10988

110-
1.5.4 / 2016-07-31
111-
==================
89+
# 1.5.4 / 2016-07-31
11290

113-
* Add space before per page #33
91+
- Add space before per page #33
11492

115-
1.5.0 / 2016-03-02
116-
==================
93+
# 1.5.0 / 2016-03-02
11794

118-
* Add `defaultPageSize` and fix `pageSize` to a controlled prop
95+
- Add `defaultPageSize` and fix `pageSize` to a controlled prop
11996

120-
1.3.0 / 2015-11-25
121-
==================
97+
# 1.3.0 / 2015-11-25
12298

123-
* Add `defaultCurrent` prop
99+
- Add `defaultCurrent` prop
124100

125-
1.2.0
126-
==================
101+
# 1.2.0
127102

128-
* Allow specifying the page size for **sizeChanger**
103+
- Allow specifying the page size for **sizeChanger**

README.md

Lines changed: 29 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
# rc-pagination
2+
23
---
34

45
React Pagination Component.
@@ -34,7 +35,7 @@ online example: http://react-component.github.io/pagination/examples/
3435

3536
## Feature
3637

37-
* support ie9,ie9+,chrome,firefox,safari
38+
- support ie9,ie9+,chrome,firefox,safari
3839

3940
## Install
4041

@@ -50,34 +51,33 @@ React.render(<Pagination />, container);
5051

5152
## API
5253

53-
| Parameter | Description | Type | Default |
54-
|------------------|------------------------------------|---------------|--------------------------|
55-
| disabled | disable pagination | Bool | - |
56-
| defaultCurrent | uncontrolled current page | Number | 1 |
57-
| current | current page | Number | undefined |
58-
| total | items total count | Number | 0 |
59-
| defaultPageSize | default items per page | Number | 10 |
60-
| pageSize | items per page | Number | 10 |
61-
| onChange | page change callback | Function(current, pageSize) | - |
62-
| showSizeChanger | show pageSize changer | Bool | false |
63-
| pageSizeOptions | specify the sizeChanger selections | Array<String> | ['10', '20', '30', '40'] |
64-
| onShowSizeChange | pageSize change callback | Function(current, size) | - |
65-
| hideOnSinglePage | hide on single page | Bool | false |
66-
| showPrevNextJumpers | show jump-prev, jump-next | Bool | true |
67-
| showQuickJumper | show quick goto jumper | Bool / Object | false / {goButton: true} |
68-
| showTotal | show total records and range | Function(total, [from, to]) | - |
69-
| className | className of pagination | String | - |
70-
| simple | when set, show simple pager | Object | null |
71-
| locale | to set l10n config | Object | [zh_CN](https://github.com/react-component/pagination/blob/master/src/locale/zh_CN.js) |
72-
| style | the style of pagination | Object | {} |
73-
| showLessItems | show less page items | Bool | false |
74-
| showTitle | show page items title | Bool | true |
75-
| itemRender | custom page item renderer | Function(current, type: 'page' | 'prev' | 'next' | 'jump-prev' | 'jump-next', element): React.ReactNode| `(current, type, element) => element` |
76-
| prevIcon | specifict the default previous icon | ReactNode \| (props: PaginationProps) => ReactNode | |
77-
| nextIcon | specifict the default previous icon | ReactNode \| (props: PaginationProps) => ReactNode | |
78-
| jumpPrevIcon | specifict the default previous icon | ReactNode \| (props: PaginationProps) => ReactNode | |
79-
| jumpNextIcon | specifict the default previous icon | ReactNode \| (props: PaginationProps) => ReactNode | |
80-
54+
| Parameter | Description | Type | Default |
55+
| ------------------- | ----------------------------------- | -------------------------------------------------- | -------------------------------------------------------------------------------------- |
56+
| disabled | disable pagination | Bool | - |
57+
| defaultCurrent | uncontrolled current page | Number | 1 |
58+
| current | current page | Number | undefined |
59+
| total | items total count | Number | 0 |
60+
| defaultPageSize | default items per page | Number | 10 |
61+
| pageSize | items per page | Number | 10 |
62+
| onChange | page change callback | Function(current, pageSize) | - |
63+
| showSizeChanger | show pageSize changer | Bool | false |
64+
| pageSizeOptions | specify the sizeChanger selections | Array<String> | ['10', '20', '30', '40'] |
65+
| onShowSizeChange | pageSize change callback | Function(current, size) | - |
66+
| hideOnSinglePage | hide on single page | Bool | false |
67+
| showPrevNextJumpers | show jump-prev, jump-next | Bool | true |
68+
| showQuickJumper | show quick goto jumper | Bool / Object | false / {goButton: true} |
69+
| showTotal | show total records and range | Function(total, [from, to]) | - |
70+
| className | className of pagination | String | - |
71+
| simple | when set, show simple pager | Object | null |
72+
| locale | to set l10n config | Object | [zh_CN](https://github.com/react-component/pagination/blob/master/src/locale/zh_CN.js) |
73+
| style | the style of pagination | Object | {} |
74+
| showLessItems | show less page items | Bool | false |
75+
| showTitle | show page items title | Bool | true |
76+
| itemRender | custom page item renderer | Function(current, type: 'page' | 'prev' | 'next' | 'jump-prev' | 'jump-next', element): React.ReactNode | `(current, type, element) => element` |
77+
| prevIcon | specifict the default previous icon | ReactNode \| (props: PaginationProps) => ReactNode | |
78+
| nextIcon | specifict the default previous icon | ReactNode \| (props: PaginationProps) => ReactNode | |
79+
| jumpPrevIcon | specifict the default previous icon | ReactNode \| (props: PaginationProps) => ReactNode | |
80+
| jumpNextIcon | specifict the default previous icon | ReactNode \| (props: PaginationProps) => ReactNode | |
8181

8282
## License
8383

dist/rc-pagination.js

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

now.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,4 +8,4 @@
88
"config": { "distDir": "build" }
99
}
1010
]
11-
}
11+
}

rc-pagination.d.ts

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -32,9 +32,13 @@ declare module 'rc-pagination' {
3232
export interface PaginationProps extends Partial<PaginationData> {
3333
onChange?: (page: number, pageSize: number) => void;
3434
onShowSizeChange?: (current: number, size: number) => void;
35-
itemRender?: (page: number, type: string, element: React.ReactNode) => React.ReactNode;
35+
itemRender?: (
36+
page: number,
37+
type: string,
38+
element: React.ReactNode,
39+
) => React.ReactNode;
3640
showTotal?: (total: number, range: [number, number]) => React.ReactNode;
3741
}
3842

39-
export default class Pagination extends React.Component<PaginationProps> { }
43+
export default class Pagination extends React.Component<PaginationProps> {}
4044
}

0 commit comments

Comments
 (0)