Created
July 5, 2019 21:45
-
-
Save stevebrownlee/3f839a0af6c2283e0f0b20a03d9e2eef to your computer and use it in GitHub Desktop.
React component to display animal information
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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