diff --git a/packages/widgets/src/blocks/widget-group/deprecated.js b/packages/widgets/src/blocks/widget-group/deprecated.js new file mode 100644 index 00000000000000..f885a1a25d80b1 --- /dev/null +++ b/packages/widgets/src/blocks/widget-group/deprecated.js @@ -0,0 +1,32 @@ +/** + * WordPress dependencies + */ +import { InnerBlocks, RichText } from '@wordpress/block-editor'; + +const v1 = { + attributes: { + title: { + type: 'string', + }, + }, + supports: { + html: false, + inserter: true, + customClassName: true, + reusable: false, + }, + save( { attributes } ) { + return ( + <> + + + + ); + }, +}; + +export default [ v1 ]; diff --git a/packages/widgets/src/blocks/widget-group/index.js b/packages/widgets/src/blocks/widget-group/index.js index 012a4a0954bb24..4876d93d519500 100644 --- a/packages/widgets/src/blocks/widget-group/index.js +++ b/packages/widgets/src/blocks/widget-group/index.js @@ -11,6 +11,8 @@ import { group as icon } from '@wordpress/icons'; import metadata from './block.json'; import edit from './edit'; import save from './save'; +import deprecated from './deprecated'; + const { name } = metadata; export { metadata, name }; @@ -73,4 +75,5 @@ export const settings = { }, ], }, + deprecated, }; diff --git a/packages/widgets/src/blocks/widget-group/save.js b/packages/widgets/src/blocks/widget-group/save.js index 203d063c27ca05..be5ec73eca6c1c 100644 --- a/packages/widgets/src/blocks/widget-group/save.js +++ b/packages/widgets/src/blocks/widget-group/save.js @@ -11,7 +11,9 @@ export default function save( { attributes } ) { className="widget-title" value={ attributes.title } /> - +
+ +
); }