How to use the @talend/react-components.ActionBar.propTypes function in @talend/react-components

To help you get started, we’ve selected a few @talend/react-components 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 Talend / ui / packages / containers / src / ActionBar / ActionBar.container.js View on Github external
const actionPropTypes = PropTypes.oneOfType([
	PropTypes.string,
	PropTypes.shape({
		displayMode: PropTypes.string.isRequired,
		actions: PropTypes.arrayOf(PropTypes.string),
		items: PropTypes.arrayOf(PropTypes.string),
	}),
]);

Object.keys(Component).forEach((key) => {
	ActionBar[key] = Component[key];
});
ActionBar.displayName = 'CMFContainer(ActionBar)';
ActionBar.propTypes = {
	...Component.propTypes,
	actionIds: PropTypes.shape({
		left: PropTypes.arrayOf(actionPropTypes),
		right: PropTypes.arrayOf(actionPropTypes),
	}),
};
ActionBar.contextTypes = {
	store: PropTypes.object,
	registry: PropTypes.object,
	router: PropTypes.object,
};

export default ActionBar;