UNPKG

@wordpress/block-library

Version:
37 lines (36 loc) • 945 B
"use strict"; Object.defineProperties(exports, { __esModule: { value: true }, [Symbol.toStringTag]: { value: "Module" } }); let _wordpress_block_editor = require("@wordpress/block-editor"); let react_jsx_runtime = require("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__ */ (0, react_jsx_runtime.jsx)("div", { ..._wordpress_block_editor.useBlockProps.save({ style: { height: attributes.height, width: attributes.width }, "aria-hidden": true }) }); } }]; exports.default = deprecated; //# sourceMappingURL=deprecated.cjs.map