diff --git a/packages/block-library/src/list/deprecated.js b/packages/block-library/src/list/deprecated.js new file mode 100644 index 0000000000000..403f475fb2989 --- /dev/null +++ b/packages/block-library/src/list/deprecated.js @@ -0,0 +1,56 @@ +/** + * External dependencies + */ + + + /** + * WordPress dependencies + */ +import { RichText, useBlockProps } from '@wordpress/block-editor'; + +const blockAttributes = { + ordered: { + type: 'boolean', + default: false, + __experimentalRole: 'content' + }, + values: { + type: 'string', + source: 'html', + selector: 'ol,ul', + multiline: 'li', + __unstableMultilineWrapperTags: [ 'ol', 'ul' ], + default: '', + __experimentalRole: 'content' + }, + type: { + type: 'string' + }, + start: { + type: 'number' + }, + reversed: { + type: 'boolean' + }, + placeholder: { + type: 'string' + } + }; + + const deprecated = [ + { + attributes: blockAttributes, + save( { attributes } ) { + const { ordered, values, type, reversed, start } = attributes; + const TagName = ordered ? 'ol' : 'ul'; + + return ( + + + + ); + }, + }, + ]; + + export default deprecated; diff --git a/packages/block-library/src/list/edit.js b/packages/block-library/src/list/edit.js index c64041fe8d9b9..88a3843ab0d00 100644 --- a/packages/block-library/src/list/edit.js +++ b/packages/block-library/src/list/edit.js @@ -137,6 +137,7 @@ export default function ListEdit( { return ( <>