UNPKG

@wordpress/block-library

Version:
44 lines (40 loc) 846 B
import { createElement } from "@wordpress/element"; /** * WordPress dependencies */ import { useBlockProps } from '@wordpress/block-editor'; 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 createElement("div", useBlockProps.save({ style: { height: attributes.height, width: attributes.width }, 'aria-hidden': true })); } }]; export default deprecated; //# sourceMappingURL=deprecated.js.map