How to use the @wordpress/editor.InnerBlocks.Content function in @wordpress/editor

To help you get started, we’ve selected a few @wordpress/editor examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github Automattic / wp-calypso / packages / jetpack-blocks / src / blocks / contact-form / index.js View on Github external
default: null,
		},

		// Deprecated
		has_form_settings_set: {
			type: 'string',
			default: null,
		},
		submit_button_text: {
			type: 'string',
			default: __( 'Submit' ),
		},
	},

	edit: JetpackContactForm,
	save: InnerBlocks.Content,
	deprecated: [
		{
			attributes: {
				subject: {
					type: 'string',
					default: '',
				},
				to: {
					type: 'string',
					default: '',
				},
				submit_button_text: {
					type: 'string',
					default: __( 'Submit' ),
				},
				has_form_settings_set: {
github Automattic / wp-calypso / packages / jetpack-blocks / src / blocks / contact-form / index.js View on Github external
submitButtonText: attr.submit_button_text,
					hasFormSettingsSet: attr.has_form_settings_set,
					to: attr.to,
					subject: attr.subject,
				};
			},

			isEligible: attr => {
				// when the deprecated, snake_case values are default, no need to migrate
				if ( ! attr.has_form_settings_set && attr.submit_button_text === 'Submit' ) {
					return false;
				}
				return true;
			},

			save: InnerBlocks.Content,
		},
	],
};

const FieldDefaults = {
	category: 'jetpack',
	parent: [ 'jetpack/contact-form' ],
	supports: {
		reusable: false,
		html: false,
	},
	attributes: {
		label: {
			type: 'string',
			default: null,
		},