<commit_before>import React, { PropTypes } from 'react'
import Component from 'react-pure-render/component'
import classnames from 'classnames'
import './Badge.scss'
import Colors from 'styles/colors'
import { scaleUp } from 'styles/typography'


export default class Badge extends Component {
  render() {
    let {
      square,
      inverted,
      color = Colors.bodyBg,
      bgColor = Colors.blueGrey300,
      heightRem = 2,
      className,
      borderColor,
      customFontSize
    } = this.props


    const style = {
      color: color,
      backgroundColor: bgColor,
      height: `${heightRem}rem`,
    }

    if (!customFontSize) {
      style.fontSize = scaleUp(heightRem - 1) + 'rem'
    }

    if (borderColor) {
      style.border = `1px solid ${borderColor}`
    }

    const classNames = classnames('Badge', className, this.props.className, {
      'square': square,
      'inverted': inverted,
    })

    return (
      <span className={classNames} style={style}>
        {this.props.children}
      </span>
    )
  }
}


Badge.propTypes = {
  square: PropTypes.bool,
  color: PropTypes.string,
  borderColor: PropTypes.string,
  bgColor: PropTypes.string,
  heightRem: PropTypes.oneOf([2, 3, 4, 5, 6, 7, 8]),
  className: PropTypes.string,
  customFontSize: PropTypes.boo,
}<commit_msg>fixed incorrect prop type<commit_after>import React, { PropTypes } from 'react'
import Component from 'react-pure-render/component'
import classnames from 'classnames'
import './Badge.scss'
import Colors from 'styles/colors'
import { scaleUp } from 'styles/typography'


export default class Badge extends Component {
  render() {
    let {
      square,
      inverted,
      color = Colors.bodyBg,
      bgColor = Colors.blueGrey300,
      heightRem = 2,
      className,
      borderColor,
      customFontSize
    } = this.props


    const style = {
      color: color,
      backgroundColor: bgColor,
      height: `${heightRem}rem`,
    }

    if (!customFontSize) {
      style.fontSize = scaleUp(heightRem - 1) + 'rem'
    }

    if (borderColor) {
      style.border = `1px solid ${borderColor}`
    }

    const classNames = classnames('Badge', className, this.props.className, {
      'square': square,
      'inverted': inverted,
    })

    return (
      <span className={classNames} style={style}>
        {this.props.children}
      </span>
    )
  }
}


Badge.propTypes = {
  square: PropTypes.bool,
  color: PropTypes.string,
  borderColor: PropTypes.string,
  bgColor: PropTypes.string,
  heightRem: PropTypes.oneOf([2, 3, 4, 5, 6, 7, 8]),
  className: PropTypes.string,
  customFontSize: PropTypes.bool,
}
{'fraction_non_alphanumeric': 0.12125805229253506, 'fraction_numerical': 0.009852216748768473, 'mean_word_length': 2.815028901734104, 'pattern_counts': {'":': 0, '<': 7, '<?xml version=': 0, '>': 7, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '3502181', 'n_tokens_mistral': 857, 'n_tokens_neox': 833, 'n_words': 201}