@wordpress/block-library
Version:
Block library for the WordPress editor.
42 lines (41 loc) • 1.66 kB
JavaScript
;
Object.defineProperties(exports, {
__esModule: { value: true },
[Symbol.toStringTag]: { value: "Module" }
});
let _wordpress_block_editor = require("@wordpress/block-editor");
let react_jsx_runtime = require("react/jsx-runtime");
// packages/block-library/src/comments-pagination-numbers/edit.jsx
const PaginationItem = ({ content, tag: Tag = "a", extraClass = "" }) => Tag === "a" ? /* @__PURE__ */ (0, react_jsx_runtime.jsx)(Tag, {
className: `page-numbers ${extraClass}`,
href: "#comments-pagination-numbers-pseudo-link",
onClick: (event) => event.preventDefault(),
children: content
}) : /* @__PURE__ */ (0, react_jsx_runtime.jsx)(Tag, {
className: `page-numbers ${extraClass}`,
children: content
});
function CommentsPaginationNumbersEdit() {
return /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", {
...(0, _wordpress_block_editor.useBlockProps)(),
children: [
/* @__PURE__ */ (0, react_jsx_runtime.jsx)(PaginationItem, { content: "1" }),
/* @__PURE__ */ (0, react_jsx_runtime.jsx)(PaginationItem, { content: "2" }),
/* @__PURE__ */ (0, react_jsx_runtime.jsx)(PaginationItem, {
content: "3",
tag: "span",
extraClass: "current"
}),
/* @__PURE__ */ (0, react_jsx_runtime.jsx)(PaginationItem, { content: "4" }),
/* @__PURE__ */ (0, react_jsx_runtime.jsx)(PaginationItem, { content: "5" }),
/* @__PURE__ */ (0, react_jsx_runtime.jsx)(PaginationItem, {
content: "...",
tag: "span",
extraClass: "dots"
}),
/* @__PURE__ */ (0, react_jsx_runtime.jsx)(PaginationItem, { content: "8" })
]
});
}
exports.default = CommentsPaginationNumbersEdit;
//# sourceMappingURL=edit.cjs.map