@wordpress/block-library
Version:
Block library for the WordPress editor.
37 lines (36 loc) • 1.26 kB
JavaScript
import { useBlockProps } from "@wordpress/block-editor";
import { jsx, jsxs } from "react/jsx-runtime";
// packages/block-library/src/comments-pagination-numbers/edit.jsx
const PaginationItem = ({ content, tag: Tag = "a", extraClass = "" }) => Tag === "a" ? /* @__PURE__ */ jsx(Tag, {
className: `page-numbers ${extraClass}`,
href: "#comments-pagination-numbers-pseudo-link",
onClick: (event) => event.preventDefault(),
children: content
}) : /* @__PURE__ */ jsx(Tag, {
className: `page-numbers ${extraClass}`,
children: content
});
function CommentsPaginationNumbersEdit() {
return /* @__PURE__ */ jsxs("div", {
...useBlockProps(),
children: [
/* @__PURE__ */ jsx(PaginationItem, { content: "1" }),
/* @__PURE__ */ jsx(PaginationItem, { content: "2" }),
/* @__PURE__ */ jsx(PaginationItem, {
content: "3",
tag: "span",
extraClass: "current"
}),
/* @__PURE__ */ jsx(PaginationItem, { content: "4" }),
/* @__PURE__ */ jsx(PaginationItem, { content: "5" }),
/* @__PURE__ */ jsx(PaginationItem, {
content: "...",
tag: "span",
extraClass: "dots"
}),
/* @__PURE__ */ jsx(PaginationItem, { content: "8" })
]
});
}
export { CommentsPaginationNumbersEdit as default };
//# sourceMappingURL=edit.mjs.map