}
}

MailchimpSignup.propTypes = {
	translate: PropTypes.func.isRequired,
	title: PropTypes.string,
	component: PropTypes.string,
	name: PropTypes.string.isRequired,
	properties: PropTypes.object,
	data: PropTypes.string,
	onChange: PropTypes.func,
	value: PropTypes.shape(
		{
			hasSignup: PropTypes.bool,
		}
	),
	stepState: PropTypes.object,
};

MailchimpSignup.defaultProps = {
	title: "Mailchimp signup",
	component: "",
	properties: {},
	data: "",
	value: {
		hasSignup: false,
	},
};

export default localize( MailchimpSignup );
Exemple #2
0
	 * Sends the data to the step component.
	 *
	 * @returns {void}
	 */
	sendChangeEvent() {
		const changeEvent = {
			target: {
				name: this.props.name,
				value: this.state.currentUpload,
			},
		};

		this.props.onChange( changeEvent );
	}
}

/**
 * Adds validation for the properties.
 */
MediaUpload.propTypes = {
	translate: PropTypes.func.isRequired,
	name: PropTypes.string.isRequired,
	value: PropTypes.any,
	onChange: PropTypes.func,
	properties: PropTypes.shape( {
		label: PropTypes.string,
	} ),
};

export default localize( MediaUpload );