/
PaginationPage.js
98 lines (91 loc) · 3.06 KB
/
PaginationPage.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
/* eslint react/no-multi-comp: 0, react/prop-types: 0 */
import React from 'react';
import { PrismCode } from 'react-prism';
import PageTitle from '../UI/PageTitle';
import SectionTitle from '../UI/SectionTitle';
import PaginationExample from '../examples/Pagination';
const PaginationExampleSource = require('!!raw-loader!../examples/Pagination');
import PaginationStateExample from '../examples/PaginationState';
const PaginationStateExampleSource = require('!!raw-loader!../examples/PaginationState');
import PaginationSizingLargeExample from '../examples/PaginationSizingLarge';
const PaginationSizingLargeExampleSource = require('!!raw-loader!../examples/PaginationSizingLarge');
import PaginationSizingSmallExample from '../examples/PaginationSizingSmall';
const PaginationSizingSmallExampleSource = require('!!raw-loader!../examples/PaginationSizingSmall');
export default class PaginationPage extends React.Component {
render() {
return (
<div>
<PageTitle title="Pagination" />
<div className="docs-example">
<PaginationExample />
</div>
<pre>
<PrismCode className="language-jsx">
{PaginationExampleSource}
</PrismCode>
</pre>
<h4>Properties</h4>
<pre>
<PrismCode className="language-jsx">
{`Pagination.propTypes = {
children: PropTypes.node,
className: PropTypes.string,
listClassName: PropTypes.string,
cssModule: PropTypes.object,
size: PropTypes.string,
tag: PropTypes.oneOfType([PropTypes.func, PropTypes.string]),
listTag: PropTypes.oneOfType([PropTypes.func, PropTypes.string]),
'aria-label': PropTypes.string
};
PaginationItem.propTypes = {
active: PropTypes.bool,
children: PropTypes.node,
className: PropTypes.string,
cssModule: PropTypes.object,
disabled: PropTypes.bool,
tag: PropTypes.oneOfType([PropTypes.func, PropTypes.string]),
};
PaginationLink.propTypes = {
children: PropTypes.node,
className: PropTypes.string,
cssModule: PropTypes.object,
next: PropTypes.bool,
previous: PropTypes.bool,
first: PropTypes.bool,
last: PropTypes.bool,
tag: PropTypes.oneOfType([PropTypes.func, PropTypes.string]),
'aria-label': PropTypes.string
};
`}
</PrismCode>
</pre>
<SectionTitle>Disabled and active states</SectionTitle>
<div className="docs-example">
<PaginationStateExample />
</div>
<pre>
<PrismCode className="language-jsx">
{PaginationStateExampleSource}
</PrismCode>
</pre>
<SectionTitle>Sizing</SectionTitle>
<div className="docs-example">
<PaginationSizingLargeExample />
</div>
<pre>
<PrismCode className="language-jsx">
{PaginationSizingLargeExampleSource}
</PrismCode>
</pre>
<div className="docs-example">
<PaginationSizingSmallExample />
</div>
<pre>
<PrismCode className="language-jsx">
{PaginationSizingSmallExampleSource}
</PrismCode>
</pre>
</div>
);
}
}