UNPKG

@wordpress/block-library

Version:
37 lines (36 loc) • 1.43 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/query-pagination-next/edit.jsx const arrowMap = { none: "", arrow: "→", chevron: "»" }; function QueryPaginationNextEdit({ attributes: { label }, setAttributes, context: { paginationArrow, showLabel } }) { const displayArrow = arrowMap[paginationArrow]; return /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("a", { href: "#pagination-next-pseudo-link", onClick: (event) => event.preventDefault(), ...(0, _wordpress_block_editor.useBlockProps)(), children: [showLabel && /* @__PURE__ */ (0, react_jsx_runtime.jsx)(_wordpress_block_editor.PlainText, { __experimentalVersion: 2, tagName: "span", "aria-label": (0, _wordpress_i18n.__)("Next page link"), placeholder: (0, _wordpress_i18n.__)("Next Page"), value: label, onChange: (newLabel) => setAttributes({ label: newLabel }) }), displayArrow && /* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", { className: `wp-block-query-pagination-next-arrow is-arrow-${paginationArrow}`, "aria-hidden": true, children: displayArrow })] }); } exports.default = QueryPaginationNextEdit; //# sourceMappingURL=edit.cjs.map