@wordpress/block-library
Version:
Block library for the WordPress editor.
27 lines (26 loc) • 1.19 kB
JavaScript
import { jsx, jsxs } from "react/jsx-runtime";
import { useBlockProps } from "@wordpress/block-editor";
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.js.map