import React from 'react';
import PropTypes from 'prop-types';
import classNames from 'classnames';

import './label.scss';

const Label = ({ className, type, ...props }) => (
  <span
    className={className}
    styleName={classNames('base', { [`label-${type}`]: type })}
    {...props}
  />
);

Label.propTypes = {
  /** @ignore */
  className: PropTypes.string,
  type: PropTypes.oneOf(['danger', 'warning', 'info', 'success'])
};

Label.defaultProps = {
  className: undefined,
  type: 'info'
};

export default Label;
