46 lines
1.5 KiB
JavaScript
46 lines
1.5 KiB
JavaScript
|
|
import _extends from "@babel/runtime-corejs2/helpers/esm/extends";
|
||
|
|
import _objectWithoutPropertiesLoose from "@babel/runtime-corejs2/helpers/esm/objectWithoutPropertiesLoose";
|
||
|
|
import _inheritsLoose from "@babel/runtime-corejs2/helpers/esm/inheritsLoose";
|
||
|
|
import classNames from 'classnames';
|
||
|
|
import React from 'react';
|
||
|
|
import PaginationItem, { First, Prev, Ellipsis, Next, Last } from './PaginationItem';
|
||
|
|
import { bsClass, getClassSet, splitBsProps } from './utils/bootstrapUtils';
|
||
|
|
|
||
|
|
var Pagination =
|
||
|
|
/*#__PURE__*/
|
||
|
|
function (_React$Component) {
|
||
|
|
_inheritsLoose(Pagination, _React$Component);
|
||
|
|
|
||
|
|
function Pagination() {
|
||
|
|
return _React$Component.apply(this, arguments) || this;
|
||
|
|
}
|
||
|
|
|
||
|
|
var _proto = Pagination.prototype;
|
||
|
|
|
||
|
|
_proto.render = function render() {
|
||
|
|
var _this$props = this.props,
|
||
|
|
className = _this$props.className,
|
||
|
|
children = _this$props.children,
|
||
|
|
props = _objectWithoutPropertiesLoose(_this$props, ["className", "children"]);
|
||
|
|
|
||
|
|
var _splitBsProps = splitBsProps(props),
|
||
|
|
bsProps = _splitBsProps[0],
|
||
|
|
elementProps = _splitBsProps[1];
|
||
|
|
|
||
|
|
var classes = getClassSet(bsProps);
|
||
|
|
return React.createElement("ul", _extends({}, elementProps, {
|
||
|
|
className: classNames(className, classes)
|
||
|
|
}), children);
|
||
|
|
};
|
||
|
|
|
||
|
|
return Pagination;
|
||
|
|
}(React.Component);
|
||
|
|
|
||
|
|
bsClass('pagination', Pagination);
|
||
|
|
Pagination.First = First;
|
||
|
|
Pagination.Prev = Prev;
|
||
|
|
Pagination.Ellipsis = Ellipsis;
|
||
|
|
Pagination.Item = PaginationItem;
|
||
|
|
Pagination.Next = Next;
|
||
|
|
Pagination.Last = Last;
|
||
|
|
export default Pagination;
|