lib/components/viewers/stop-viewer.js
function getStatusLabel (delay) {
  // late departure
  if (delay > 60) {
    return (
      <div className='status-label' style={{ backgroundColor: '#d9534f' }}>
        {formatDuration(delay)} Late
      </div>
    )
  }

  // early departure
  if (delay < -60) {
    return (
      <div className='status-label' style={{ backgroundColor: '#337ab7' }}>
        {formatDuration(Math.abs(delay))} Early
      </div>
    )
  }

  // on-time departure
  return (
    <div className='status-label' style={{ backgroundColor: '#5cb85c' }}>
      On Time
    </div>
  )
}
function getStatusLabel (delay) {
  // late departure
  if (delay > 60) {
    return (
      <div className='status-label' style={{ backgroundColor: '#d9534f' }}>
        {formatDuration(delay)} Late
      </div>
    )
  }

  // early departure
  if (delay < -60) {
    return (
      <div className='status-label' style={{ backgroundColor: '#337ab7' }}>
        {formatDuration(Math.abs(delay))} Early
      </div>
    )
  }

  // on-time departure
  return (
    <div className='status-label' style={{ backgroundColor: '#5cb85c' }}>
      On Time
    </div>
  )
}
function getStatusLabel ( delay ) { // late departure if ( delay > 60 ) { return ( < div className = 'status-label' style = { { backgroundColor : '#d9534f' } } > { formatDuration ( delay ) }  Late
       < / div > ) } // early departure if ( delay < - 60 ) { return ( < div className = 'status-label' style = { { backgroundColor : '#337ab7' } } > { formatDuration ( Math . abs ( delay ) ) }  Early
       < / div > ) } // on-time departure return ( < div className = 'status-label' style = { { backgroundColor : '#5cb85c' } } > 
      On Time
     < / div > ) }
helper method to generate status label
helper method to generate status label