UNPKG

1.53 kBJavaScriptView Raw
1import _extends from "@babel/runtime-corejs2/helpers/esm/extends";
2import _objectWithoutPropertiesLoose from "@babel/runtime-corejs2/helpers/esm/objectWithoutPropertiesLoose";
3import _inheritsLoose from "@babel/runtime-corejs2/helpers/esm/inheritsLoose";
4import classNames from 'classnames';
5import React from 'react';
6import PaginationItem, { First, Prev, Ellipsis, Next, Last } from './PaginationItem';
7import { bsClass, getClassSet, splitBsProps } from './utils/bootstrapUtils';
8
9var Pagination =
10/*#__PURE__*/
11function (_React$Component) {
12 _inheritsLoose(Pagination, _React$Component);
13
14 function Pagination() {
15 return _React$Component.apply(this, arguments) || this;
16 }
17
18 var _proto = Pagination.prototype;
19
20 _proto.render = function render() {
21 var _this$props = this.props,
22 className = _this$props.className,
23 children = _this$props.children,
24 props = _objectWithoutPropertiesLoose(_this$props, ["className", "children"]);
25
26 var _splitBsProps = splitBsProps(props),
27 bsProps = _splitBsProps[0],
28 elementProps = _splitBsProps[1];
29
30 var classes = getClassSet(bsProps);
31 return React.createElement("ul", _extends({}, elementProps, {
32 className: classNames(className, classes)
33 }), children);
34 };
35
36 return Pagination;
37}(React.Component);
38
39bsClass('pagination', Pagination);
40Pagination.First = First;
41Pagination.Prev = Prev;
42Pagination.Ellipsis = Ellipsis;
43Pagination.Item = PaginationItem;
44Pagination.Next = Next;
45Pagination.Last = Last;
46export default Pagination;
\No newline at end of file