{"size": 606, "ext": "js", "max_stars_repo_path": "client/src/components/Fruit/Fruit.js", "max_stars_repo_name": "PaulMasonDev/The-Fruit-Basket", "max_stars_repo_stars_event_min_datetime": null, "max_stars_repo_stars_event_max_datetime": null, "max_issues_repo_path": "client/src/components/Fruit/Fruit.js", "max_issues_repo_name": "PaulMasonDev/The-Fruit-Basket", "max_issues_repo_issues_event_min_datetime": null, "max_issues_repo_issues_event_max_datetime": null, "max_forks_repo_path": "client/src/components/Fruit/Fruit.js", "max_forks_repo_name": "PaulMasonDev/The-Fruit-Basket", "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.347826087, "max_line_length": 110, "alphanum_fraction": 0.5874587459}
import React from 'react'

import './Fruit.css'

import Counter from '../Counter/Counter';

const Fruit = ( { fruit, items, updateCart }) => {
  return (
    <div className="Fruit">
      <img className="Fruit__img" src={fruit.url} alt={fruit.title}/>
      <div className="Fruit__counter-container">
        <Counter fruit={fruit.title} type="fruit" items={items} qty={fruit.quantity} updateCart={updateCart}/>
        <div>
          <p>{fruit.title}</p>
          <p>{`$${fruit.price.toFixed(2)}`}</p>
        </div>
      </div>
      <p>{fruit.description}</p>
    </div>
  );
}

export default Fruit;