@trellixio/roaster-coffee
Version:
Beans' product component library
36 lines (30 loc) • 1.31 kB
JavaScript
;
var React = require('react');
var Button = require('../Button/Button.js');
var index = require('../../utils/classNames/index.js');
require('@floating-ui/react');
function _interopNamespaceDefault(e) {
var n = Object.create(null);
if (e) {
for (var k in e) {
n[k] = e[k];
}
}
n.default = e;
return Object.freeze(n);
}
var React__namespace = /*#__PURE__*/_interopNamespaceDefault(React);
function Pagination({
onNext,
onPrevious,
hasNext,
hasPrevious,
previousButtonProps,
nextButtonProps,
className
}) {
return /* @__PURE__ */ React__namespace.createElement("nav", { className: index.classNames("pagination", className) }, /* @__PURE__ */ React__namespace.createElement(Button.Button, { variant: "secondary", disabled: !hasPrevious, onClick: () => onPrevious(), ...previousButtonProps }, /* @__PURE__ */ React__namespace.createElement("i", { className: "fa-regular fa-chevron-left" })), /* @__PURE__ */ React__namespace.createElement(Button.Button, { variant: "secondary", disabled: !hasNext, onClick: () => onNext(), ...nextButtonProps }, /* @__PURE__ */ React__namespace.createElement("i", { className: "fa-regular fa-chevron-right" })));
}
Pagination.displayName = "Pagination";
exports.Pagination = Pagination;
//# sourceMappingURL=Pagination.js.map