{"size": 685, "ext": "js", "max_stars_repo_path": "src/components/Beer.js", "max_stars_repo_name": "faustlarsen/BeerRoom", "max_stars_repo_stars_event_min_datetime": null, "max_stars_repo_stars_event_max_datetime": null, "max_issues_repo_path": "src/components/Beer.js", "max_issues_repo_name": "faustlarsen/BeerRoom", "max_issues_repo_issues_event_min_datetime": null, "max_issues_repo_issues_event_max_datetime": null, "max_forks_repo_path": "src/components/Beer.js", "max_forks_repo_name": "faustlarsen/BeerRoom", "max_forks_repo_forks_event_min_datetime": null, "max_forks_repo_forks_event_max_datetime": null}
{"max_stars_count": null, "max_issues_count": null, "max_forks_count": null, "avg_line_length": 26.3461538462, "max_line_length": 89, "alphanum_fraction": 0.6306569343}
import React from 'react';
import PropTypes from "prop-types";

function Beer(props) {

  return (
    <React.Fragment>
      <div onClick = {() => props.whenBeerClicked(props.id)}> 
        <div className="text-center text-white" style={{fontSize: 24, color: "#ffa645"}}>
          <h5 style={{color: '#010104'}}>Brand: {props.brand} - ${props.price}</h5>
          <h5 style={{color: '#010104'}}>Pints left: {props.keg}</h5>
        </div>
      </div>
    </React.Fragment>
  )
}

Beer.propTypes = {
  brand: PropTypes.string.isRequired,
  price: PropTypes.number.isRequired,
  keg: PropTypes.number,
  id: PropTypes.string,
  whenBeerClicked: PropTypes.func
}

export default Beer;