UNPKG

@wordpress/block-library

Version:
49 lines (48 loc) 1.36 kB
// packages/block-library/src/comments-pagination-next/edit.js import { __ } from "@wordpress/i18n"; import { useBlockProps, PlainText } from "@wordpress/block-editor"; import { jsx, jsxs } from "react/jsx-runtime"; var arrowMap = { none: "", arrow: "\u2192", chevron: "\xBB" }; function CommentsPaginationNextEdit({ attributes: { label }, setAttributes, context: { "comments/paginationArrow": paginationArrow } }) { const displayArrow = arrowMap[paginationArrow]; return /* @__PURE__ */ jsxs( "a", { href: "#comments-pagination-next-pseudo-link", onClick: (event) => event.preventDefault(), ...useBlockProps(), children: [ /* @__PURE__ */ jsx( PlainText, { __experimentalVersion: 2, tagName: "span", "aria-label": __("Newer comments page link"), placeholder: __("Newer Comments"), value: label, onChange: (newLabel) => setAttributes({ label: newLabel }) } ), displayArrow && /* @__PURE__ */ jsx( "span", { className: `wp-block-comments-pagination-next-arrow is-arrow-${paginationArrow}`, children: displayArrow } ) ] } ); } export { CommentsPaginationNextEdit as default }; //# sourceMappingURL=edit.js.map