@wordpress/block-library
Version:
Block library for the WordPress editor.
24 lines (23 loc) • 1.27 kB
JavaScript
;
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 __use_term_description_js = require("./use-term-description.cjs");
let react_jsx_runtime = require("react/jsx-runtime");
// packages/block-library/src/term-description/edit.jsx
function TermDescriptionEdit({ context: { termId, taxonomy } }) {
const { termDescription } = (0, __use_term_description_js.useTermDescription)(termId, taxonomy);
const blockProps = (0, _wordpress_block_editor.useBlockProps)();
return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(react_jsx_runtime.Fragment, { children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)("div", {
...blockProps,
children: termDescription ? /* @__PURE__ */ (0, react_jsx_runtime.jsx)("div", { dangerouslySetInnerHTML: { __html: termDescription } }) : /* @__PURE__ */ (0, react_jsx_runtime.jsx)("div", {
className: "wp-block-term-description__placeholder",
children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", { children: (0, _wordpress_i18n.__)("Term Description") })
})
}) });
}
exports.default = TermDescriptionEdit;
//# sourceMappingURL=edit.cjs.map