Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
/**
* Shape for ApplicationLayout's `utilityConfig` prop.
*/
const utilityConfigPropType = PropTypes.shape({
title: PropTypes.string,
accessory: PropTypes.element,
onChange: PropTypes.func.isRequired,
menuItems: PropTypes.arrayOf(UtilityUtils.itemShape).isRequired,
initialSelectedKey: PropTypes.string.isRequired,
});
/**
* Shape for utilityConfig's menuItem.
*/
const utilityMenuItemPropType = UtilityUtils.itemShape;
export default {
utilityConfigPropType,
utilityMenuItemPropType,
layoutConfigPropType,
nameConfigPropType,
navigationAlignmentPropType,
navigationItemsPropType,
};
*/
const navigationItemsPropType = PropTypes.arrayOf(PropTypes.shape({
path: PropTypes.string.isRequired,
text: PropTypes.string.isRequired,
hasSubMenu: PropTypes.bool,
icon: PropTypes.node,
}));
/**
* Shape for ApplicationLayout's `utilityConfig` prop.
*/
const utilityConfigPropType = PropTypes.shape({
title: PropTypes.string,
accessory: PropTypes.element,
onChange: PropTypes.func.isRequired,
menuItems: PropTypes.arrayOf(UtilityUtils.itemShape).isRequired,
initialSelectedKey: PropTypes.string.isRequired,
});
/**
* Shape for utilityConfig's menuItem.
*/
const utilityMenuItemPropType = UtilityUtils.itemShape;
export default {
utilityConfigPropType,
utilityMenuItemPropType,
layoutConfigPropType,
nameConfigPropType,
navigationAlignmentPropType,
navigationItemsPropType,
};