function _extends() { _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }

function _objectWithoutProperties(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } if (Object.getOwnPropertySymbols) { var sourceSymbolKeys = Object.getOwnPropertySymbols(source); for (i = 0; i < sourceSymbolKeys.length; i++) { key = sourceSymbolKeys[i]; if (excluded.indexOf(key) >= 0) continue; if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue; target[key] = source[key]; } } return target; }

import React from 'react';
import PropTypes from 'prop-types';
/**
 * @category communication
 * @component badge
 * @variations collab-ui-react
 */

var Badge = function Badge(props) {
  var className = props.className,
      rounded = props.rounded,
      color = props.color,
      otherHTMLProps = _objectWithoutProperties(props, ["className", "rounded", "color"]);

  return React.createElement("span", _extends({
    className: "cui-badge" + ("" + (rounded && ' cui-badge--round' || '')) + ("" + (color && " cui-badge--" + color || '')) + ("" + (className && " " + className || ''))
  }, otherHTMLProps), props.children);
};

Badge.displayName = 'Badge';
Badge.propTypes = {
  /**
   * optional css class string
   */
  className: PropTypes.string,

  /**
   * optional type prop type
   */
  color: PropTypes.string,

  /**
   * optional rounded prop type
   */
  rounded: PropTypes.bool,

  /**
   * optional single element child
   */
  children: PropTypes.element
};
Badge.defaultProps = {
  children: null,
  className: '',
  rounded: false
};
export default Badge;
/**
* @name Default Badges
* @description Default state of badge.
*
* @category communication
* @component badge
* @section default
*
* @js

export default function Types() {
    return (
      <div className='row'>
        <div className='example-spacing'>
          <p><span className='h3'>Default</span></p>
          <div>
            <Badge>
                <div>Default</div>
            </Badge>
          </div>
          <br></br>
          <p><span className='h3'>Blue</span><code>color='blue'</code></p>
          <div>
            <Badge color='blue'>
              <div>Blue</div>
            </Badge>
          </div>
          <br></br>
          <p><span className='h3'>Red</span><code>color='red'</code></p>
          <div>
            <Badge color='red'>
              <div>Red</div>
            </Badge>
          </div>
          <br></br>
          <p><span className='h3'>Yellow</span><code>color='yellow'</code></p>
          <div>
            <Badge color='yellow'>
              <div>Yellow</div>
            </Badge>
          </div>
          <br></br>
          <p><span className='h3'>Green</span><code>color='green'</code></p>
          <div>
            <Badge color='green'>
              <div>Green</div>
            </Badge>
          </div>
          <br></br>
          <p><span className='h3'>Mint</span><code>color='mint'</code></p>
          <div>
            <Badge color='mint'>
              <div>Mint</div>
            </Badge>
          </div>
          <br></br>
          <p><span className='h3'>Default</span><code>color='pastel'</code></p>
          <div>
            <Badge color='pastel'>
                <div>Default</div>
            </Badge>
          </div>
          <br></br>
          <p><span className='h3'>Blue</span><code>color='blue-pastel'</code></p>
          <div>
            <Badge color='blue-pastel'>
              <div>Blue</div>
            </Badge>
          </div>
          <br></br>
          <p><span className='h3'>Red</span><code>color='red-pastel'</code></p>
          <div>
            <Badge color='red-pastel'>
              <div>Red</div>
            </Badge>
          </div>
          <br></br>
          <p><span className='h3'>Yellow</span><code>color='yellow-pastel'</code></p>
          <div>
            <Badge color='yellow-pastel'>
              <div>Yellow</div>
            </Badge>
          </div>
          <br></br>
          <p><span className='h3'>Green</span><code>color='green-pastel'</code></p>
          <div>
            <Badge color='green-pastel'>
              <div>Green</div>
            </Badge>
          </div>
          <br></br>
          <p><span className='h3'>Mint</span><code>color='mint-pastel'</code></p>
          <div>
            <Badge color='mint-pastel'>
              <div>Mint</div>
            </Badge>
          </div>
        </div>
      </div>
    );
  }

**/

/**
* @name Rounded Badges
* @description Rounded state of badges
*
* @category communication
* @component badge
* @section round
*
*
* @js

export default function Rounded() {
    return (
      <div className='row'>
        <div className='example-spacing'>
          <p><span className='h3'>Default</span><code>rounded</code></p>
          <div>
            <Badge rounded>
                <div>Default</div>
            </Badge>
          </div>
          <br></br>
          <p><span className='h3'>Blue</span><code>rounded color='blue'</code></p>
          <div>
            <Badge color='blue' rounded>
              <div>Blue</div>
            </Badge>
          </div>
          <br></br>
          <p><span className='h3'>Red</span><code>rounded color='red'</code></p>
          <div>
            <Badge color='red' rounded>
              <div>Red</div>
            </Badge>
          </div>
          <br></br>
          <p><span className='h3'>Yellow</span><code>rounded color='yellow'</code></p>
          <div>
            <Badge color='yellow' rounded>
              <div>Yellow</div>
            </Badge>
          </div>
          <br></br>
          <p><span className='h3'>Green</span><code>rounded color='green'</code></p>
          <div>
            <Badge color='green' rounded>
              <div>Green</div>
            </Badge>
          </div>
          <br></br>
          <p><span className='h3'>Mint</span><code>rounded color='mint'</code></p>
          <div>
            <Badge color='mint' rounded>
              <div>Mint</div>
            </Badge>
          </div>
          <br></br>
          <p><span className='h3'>Default</span><code>rounded color='pastel'</code></p>
          <div>
            <Badge color='pastel' rounded>
                <div>Default</div>
            </Badge>
          </div>
          <br></br>
          <p><span className='h3'>Blue</span><code>rounded color='blue-pastel'</code></p>
          <div>
            <Badge color='blue-pastel' rounded>
              <div>Blue</div>
            </Badge>
          </div>
          <br></br>
          <p><span className='h3'>Red</span><code>rounded color='red-pastel'</code></p>
          <div>
            <Badge color='red-pastel' rounded>
              <div>Red</div>
            </Badge>
          </div>
          <br></br>
          <p><span className='h3'>Yellow</span><code>rounded color='yellow-pastel'</code></p>
          <div>
            <Badge color='yellow-pastel' rounded>
              <div>Yellow</div>
            </Badge>
          </div>
          <br></br>
          <p><span className='h3'>Green</span><code>rounded color='green-pastel'</code></p>
          <div>
            <Badge color='green-pastel' rounded>
              <div>Green</div>
            </Badge>
          </div>
          <br></br>
          <p><span className='h3'>Mint</span><code>rounded color='mint-pastel'</code></p>
          <div>
            <Badge color='mint-pastel' rounded>
              <div>Mint</div>
            </Badge>
          </div>
          <br></br>
        </div>
      </div>
    );
  }
**/