Skip to content

Instantly share code, notes, and snippets.

@stevebrownlee
Created July 5, 2019 21:45
Show Gist options
  • Save stevebrownlee/3f839a0af6c2283e0f0b20a03d9e2eef to your computer and use it in GitHub Desktop.
Save stevebrownlee/3f839a0af6c2283e0f0b20a03d9e2eef to your computer and use it in GitHub Desktop.
React component to display animal information
import "./AnimalCard.css"
import React from "react"
export default props => {
return (
<li>
<div className="card-body">
<div className="animal__header">
<h5 className="card-title">
<button className="link--card btn btn-link"
onClick={() => {
props.showTreatmentHistory(props.animal)
}}> {props.animal.name} </button>
</h5>
<span className="card-text small">{props.animal.breed}</span>
</div>
</div>
</li>
)
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment