@wordpress/block-library
Version:
Block library for the WordPress editor.
53 lines (46 loc) • 1 kB
JavaScript
Object.defineProperty(exports, "__esModule", {
value: true
});
exports.default = void 0;
var _element = require("@wordpress/element");
var _blockEditor = require("@wordpress/block-editor");
/**
* WordPress dependencies
*/
const deprecated = [{
attributes: {
height: {
type: 'number',
default: 100
},
width: {
type: 'number'
}
},
migrate(attributes) {
const {
height,
width
} = attributes;
return { ...attributes,
width: width !== undefined ? `${width}px` : undefined,
height: height !== undefined ? `${height}px` : undefined
};
},
save(_ref) {
let {
attributes
} = _ref;
return (0, _element.createElement)("div", _blockEditor.useBlockProps.save({
style: {
height: attributes.height,
width: attributes.width
},
'aria-hidden': true
}));
}
}];
var _default = deprecated;
exports.default = _default;
//# sourceMappingURL=deprecated.js.map
;