1 | import _extends from 'babel-runtime/helpers/extends';
|
2 | import _objectWithoutProperties from 'babel-runtime/helpers/objectWithoutProperties';
|
3 | import _classCallCheck from 'babel-runtime/helpers/classCallCheck';
|
4 | import _possibleConstructorReturn from 'babel-runtime/helpers/possibleConstructorReturn';
|
5 | import _inherits from 'babel-runtime/helpers/inherits';
|
6 | import classNames from 'classnames';
|
7 | import React from 'react';
|
8 |
|
9 | import PaginationItem, { First, Prev, Ellipsis, Next, Last } from './PaginationItem';
|
10 | import { bsClass, getClassSet, splitBsProps } from './utils/bootstrapUtils';
|
11 |
|
12 | var Pagination = function (_React$Component) {
|
13 | _inherits(Pagination, _React$Component);
|
14 |
|
15 | function Pagination() {
|
16 | _classCallCheck(this, Pagination);
|
17 |
|
18 | return _possibleConstructorReturn(this, _React$Component.apply(this, arguments));
|
19 | }
|
20 |
|
21 | Pagination.prototype.render = function render() {
|
22 | var _props = this.props,
|
23 | className = _props.className,
|
24 | children = _props.children,
|
25 | props = _objectWithoutProperties(_props, ['className', 'children']);
|
26 |
|
27 | var _splitBsProps = splitBsProps(props),
|
28 | bsProps = _splitBsProps[0],
|
29 | elementProps = _splitBsProps[1];
|
30 |
|
31 | var classes = getClassSet(bsProps);
|
32 |
|
33 | return React.createElement(
|
34 | 'ul',
|
35 | _extends({}, elementProps, { className: classNames(className, classes) }),
|
36 | children
|
37 | );
|
38 | };
|
39 |
|
40 | return Pagination;
|
41 | }(React.Component);
|
42 |
|
43 | bsClass('pagination', Pagination);
|
44 |
|
45 | Pagination.First = First;
|
46 | Pagination.Prev = Prev;
|
47 | Pagination.Ellipsis = Ellipsis;
|
48 | Pagination.Item = PaginationItem;
|
49 | Pagination.Next = Next;
|
50 | Pagination.Last = Last;
|
51 |
|
52 | export default Pagination; |
\ | No newline at end of file |