@wordpress/block-library
Version:
Block library for the WordPress editor.
53 lines (52 loc) • 1.14 kB
JavaScript
// packages/block-library/src/math/deprecated.jsx
import { useBlockProps } from "@wordpress/block-editor";
import { jsx } from "react/jsx-runtime";
var legacyAttributes = {
latex: {
type: "string",
role: "content"
},
mathML: {
type: "string",
source: "html",
selector: "math"
}
};
var v2 = {
attributes: legacyAttributes,
save({ attributes }) {
const { latex, mathML } = attributes;
if (!latex) {
return null;
}
return /* @__PURE__ */ jsx("div", { ...useBlockProps.save(), children: /* @__PURE__ */ jsx(
"math",
{
display: "block",
dangerouslySetInnerHTML: { __html: mathML }
}
) });
}
};
var v1 = {
attributes: legacyAttributes,
save({ attributes }) {
const { latex, mathML } = attributes;
if (!latex) {
return null;
}
return /* @__PURE__ */ jsx(
"math",
{
...useBlockProps.save(),
display: "block",
dangerouslySetInnerHTML: { __html: mathML }
}
);
}
};
var deprecated_default = [v2, v1];
export {
deprecated_default as default
};
//# sourceMappingURL=deprecated.mjs.map