UNPKG

@wordpress/block-library

Version:
36 lines (35 loc) • 1.44 kB
"use strict"; Object.defineProperties(exports, { __esModule: { value: true }, [Symbol.toStringTag]: { value: "Module" } }); let _wordpress_i18n = require("@wordpress/i18n"); let _wordpress_block_editor = require("@wordpress/block-editor"); let react_jsx_runtime = require("react/jsx-runtime"); // packages/block-library/src/comments-pagination-next/edit.jsx const arrowMap = { none: "", arrow: "→", chevron: "»" }; function CommentsPaginationNextEdit({ attributes: { label }, setAttributes, context: { "comments/paginationArrow": paginationArrow } }) { const displayArrow = arrowMap[paginationArrow]; return /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("a", { href: "#comments-pagination-next-pseudo-link", onClick: (event) => event.preventDefault(), ...(0, _wordpress_block_editor.useBlockProps)(), children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)(_wordpress_block_editor.PlainText, { __experimentalVersion: 2, tagName: "span", "aria-label": (0, _wordpress_i18n.__)("Newer comments page link"), placeholder: (0, _wordpress_i18n.__)("Newer Comments"), value: label, onChange: (newLabel) => setAttributes({ label: newLabel }) }), displayArrow && /* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", { className: `wp-block-comments-pagination-next-arrow is-arrow-${paginationArrow}`, children: displayArrow })] }); } exports.default = CommentsPaginationNextEdit; //# sourceMappingURL=edit.cjs.map