How to use terra-base - 3 common examples

To help you get started, we’ve selected a few terra-base 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 cerner / terra-core / packages / terra-menu / src / _MenuContent.jsx View on Github external
{items}
            
          
        
      
    );
  }
}


MenuContent.propTypes = propTypes;
MenuContent.defaultProps = defaultProps;
MenuContent.childContextTypes = childContextTypes;

export default injectIntl(MenuContent);
github cerner / terra-framework / packages / terra-application-layout / src / safe-routing / SafeRoutingProvider.jsx View on Github external
);
  }
}

SafeRoutingProvider.propTypes = {
  intl: intlShape,
  children: PropTypes.node,
  history: PropTypes.object,
};

const safeRoutingShape = PropTypes.shape({
  block: PropTypes.func,
  push: PropTypes.func,
});

export default withRouter(injectIntl(SafeRoutingProvider));
export { safeRoutingShape };
github cerner / terra-core / packages / terra-menu / src / _MenuContent.jsx View on Github external
import IconLeft from 'terra-icon/lib/icon/IconLeft';
import ContentContainer from 'terra-content-container';
import IconClose from 'terra-icon/lib/icon/IconClose';
import Arrange from 'terra-arrange';
import classNames from 'classnames/bind';
import 'terra-base/lib/baseStyles';
import MenuUtils from './_MenuUtils';
import styles from './Menu.module.scss';

const cx = classNames.bind(styles);

const propTypes = {
  /**
   * The intl object to be injected for translations. Provided by the injectIntl function.
   */
  intl: intlShape.isRequired,
  /**
   * Title the should be displayed in header.
   */
  title: PropTypes.string,
  /**
   * Callback function for when back button is clicked.
   */
  onRequestBack: PropTypes.func,
  /**
   * Callback function for when close button is clicked.
   */
  onRequestClose: PropTypes.func,
  /**
   * Callback function that takes the content to be displayed next and is called when an item with nested content is clicked.
   */
  onRequestNext: PropTypes.func.isRequired,

terra-base

The base component sets minimal global styles for an application.

Apache-2.0
Latest version published 2 months ago

Package Health Score

88 / 100
Full package analysis