Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support for block variation JS generation #7

Open
bacoords opened this issue Jun 5, 2024 · 0 comments
Open

Support for block variation JS generation #7

bacoords opened this issue Jun 5, 2024 · 0 comments

Comments

@bacoords
Copy link

bacoords commented Jun 5, 2024

This tool generates the JS object for creating blocks with inner blocks where it expects arrays/separate parameters (where you have name, attributes, innerBlocks separately).

But for Block Variations, it's basically an object with 'name' and 'innerBlocks' as keys in the object. If PRs are being reviewed still, let me know.

InnerBlocks

[
	'core/group',
	{
		"layout":{
			"type":"constrained"
		}
	},
	[
		[
			'core/paragraph',
			{},
			[]
		],
		
	]
],

would be more like

Block Variation

{
	name: 'core/group',
	attributes: {
		"layout":{
			"type":"constrained"
		}
	},
	innerBlocks: [
		{
			name: 'core/paragraph',
			attributes: {},
			innerBlocks: []
		},
		
	]
},
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant