Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
import { Utils } from 'terra-application-layout';
import escapeRegExp from 'lodash.escaperegexp';
const propTypes = {
/**
* The title to render within the DevSiteRoutingMenu's header.
*/
title: PropTypes.string,
/**
* The array of routing shapes to be rendered as menu items within the DevSiteRoutingMenu.
*/
menuItems: Utils.propTypes.navigationItemsPropType, // eslint-disable-line react/forbid-foreign-prop-types
/**
* The Object of layout-related APIs provided to the components of the Layout.
*/
layoutConfig: Utils.propTypes.layoutConfigPropType.isRequired, // eslint-disable-line react/forbid-foreign-prop-types
/**
* The Object containing RoutingStack APIs provided to children of the RoutingStack. This is
* used to render a Back button upon presence of a `showParent` implementation.
*/
routingStackDelegate: RoutingStackDelegate.propType.isRequired,
/**
* The location from the router context. This prop is provided by the `withRouter` HOC-generator.
*/
location: PropTypes.shape({
pathname: PropTypes.string,
}).isRequired,
};
const defaultProps = {
title: '',
menuItems: [],
import PropTypes from 'prop-types';
import { Utils } from 'terra-application-layout';
import styles from './Extensions.scss';
const cx = classNames.bind(styles);
const propTypes = {
/**
* The children extension items passed to the component.
*/
children: PropTypes.node,
/**
* The layout configuration information to flex rendering..
*/
layoutConfig: Utils.propTypes.layoutConfigPropType, // eslint-disable-line react/forbid-foreign-prop-types
};
const defaultProps = {
children: [],
layoutConfig: undefined,
};
const Extensions = (props) => {
const { children, layoutConfig } = props;
const isCompactSize = Utils.helpers.isSizeCompact(layoutConfig.size);
let containerProps = { className: cx('container') };
if (isCompactSize) {
containerProps = {
className: cx('container-compact'),
};
import NavigationSideMenu from 'terra-navigation-side-menu';
import RoutingStackDelegate from 'terra-navigation-layout/lib/RoutingStackDelegate';
import SearchField from 'terra-search-field';
import { FormattedMessage } from 'react-intl';
import { Utils } from 'terra-application-layout';
import escapeRegExp from 'lodash.escaperegexp';
const propTypes = {
/**
* The title to render within the DevSiteRoutingMenu's header.
*/
title: PropTypes.string,
/**
* The array of routing shapes to be rendered as menu items within the DevSiteRoutingMenu.
*/
menuItems: Utils.propTypes.navigationItemsPropType, // eslint-disable-line react/forbid-foreign-prop-types
/**
* The Object of layout-related APIs provided to the components of the Layout.
*/
layoutConfig: Utils.propTypes.layoutConfigPropType.isRequired, // eslint-disable-line react/forbid-foreign-prop-types
/**
* The Object containing RoutingStack APIs provided to children of the RoutingStack. This is
* used to render a Back button upon presence of a `showParent` implementation.
*/
routingStackDelegate: RoutingStackDelegate.propType.isRequired,
/**
* The location from the router context. This prop is provided by the `withRouter` HOC-generator.
*/
location: PropTypes.shape({
pathname: PropTypes.string,
}).isRequired,
};