@wordpress/block-library
Version:
Block library for the WordPress editor.
32 lines (31 loc) • 754 B
JavaScript
import { useBlockProps } from "@wordpress/block-editor";
import { jsx } from "react/jsx-runtime";
// packages/block-library/src/spacer/deprecated.jsx
const deprecated = [{
attributes: {
height: {
type: "number",
default: 100
},
width: { type: "number" }
},
migrate(attributes) {
const { height, width } = attributes;
return {
...attributes,
width: width !== void 0 ? `${width}px` : void 0,
height: height !== void 0 ? `${height}px` : void 0
};
},
save({ attributes }) {
return /* @__PURE__ */ jsx("div", { ...useBlockProps.save({
style: {
height: attributes.height,
width: attributes.width
},
"aria-hidden": true
}) });
}
}];
export { deprecated as default };
//# sourceMappingURL=deprecated.mjs.map