All files / lib/TopbarRight index.js

100% Statements 5/5
66.67% Branches 2/3
100% Functions 1/1
100% Lines 5/5
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38                    3x 3x                       89x             89x         89x    
import React from 'react';
import PropTypes from 'prop-types';
 
/**
 * Topbar Right
 * @param props
 */
class TopbarRight extends React.PureComponent {
 
  render() {
    const { className, children } = this.props;
    return (
      <div
        className={
          `cui-top-bar__right` +
          `${(className && ` ${className}`) || ''}`
        }>
        {children}
      </div>
    );
  }
}
 
TopbarRight.propTypes = {
  /** @prop Children node to render inside of TopbarRight | null */
  children: PropTypes.node,
  /** @prop Optional CSS class string | '' */
  className: PropTypes.string,
};
 
TopbarRight.defaultProps = {
  children: null,
  className: '',
};
 
TopbarRight.displayName = 'TopbarRight';
 
export default TopbarRight;