content: import React from 'react'
  import numeral from 'numeral'
  
  export default React.createClass({
    render() {
      let participant = this.props.data
  
      let damage = participant.data.dmg
      let damageText = `${numeral(damage/this.props.duration).format('0')} dps (${Math.round(damage/this.props.totalDamage*10000)/100}%)`
      let relativePercentage = damage/this.props.maxDamage*100
      let deaths = _.times(participant.data.death, (n) => <span className="death" key={"deah-"+n}>{String.fromCharCode(10013)}</span>)
  
      return (
        <div className="damage">
          <div className={`bar bar--${participant.class}`} style={{width: 'calc('+relativePercentage+'% - '+((relativePercentage/100)*130)+'px)'}}>
            { relativePercentage > 20 && <div className="damage__text">{ participant.name } { deaths }</div> }
            { relativePercentage > 20 && <div className="damage__text__percentage">{ damageText }</div>}
          </div>
          { relativePercentage <= 20 && <div className="damage__text--shame">{ participant.name } { deaths } - { damageText }</div>}
        </div>
      )
    }
  })
  