Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
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;