@renderlesskit/react
Version:
Collection of headless components/hooks that are accessible, composable, customizable from low level to build your own UI & Design System powered by Reakit
32 lines (26 loc) • 988 B
JavaScript
;
Object.defineProperty(exports, "__esModule", {
value: true
});
exports.usePagination = exports.Pagination = void 0;
var _reakitSystem = require("reakit-system");
var _reakit = require("reakit");
var _reakitWarning = require("reakit-warning");
var _keys = require("./__keys");
var usePagination = (0, _reakitSystem.createHook)({
name: "Pagination",
compose: _reakit.useRole,
keys: _keys.PAGINATION_KEYS
});
exports.usePagination = usePagination;
var Pagination = (0, _reakitSystem.createComponent)({
as: "nav",
memo: true,
useHook: usePagination,
useCreateElement: function useCreateElement(type, props, children) {
(0, _reakitWarning.useWarning)(!props["aria-label"] && !props["aria-labelledby"], "You should provide either `aria-label` or `aria-labelledby` props.", "See https://mzl.la/2VCL8ys");
return (0, _reakitSystem.useCreateElement)(type, props, children);
}
});
exports.Pagination = Pagination;
//# sourceMappingURL=Pagination.js.map