UNPKG

@wordpress/block-library

Version:
44 lines (43 loc) 986 B
// packages/block-library/src/spacer/deprecated.js import { useBlockProps } from "@wordpress/block-editor"; import { jsx } from "react/jsx-runtime"; var 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 }) } ); } } ]; var deprecated_default = deprecated; export { deprecated_default as default }; //# sourceMappingURL=deprecated.mjs.map