Created
December 15, 2019 04:54
-
-
Save Dromediansk/fa45bf1b4f2b799bce99c3bdfd2b401e to your computer and use it in GitHub Desktop.
CountryCard react-tips
This file contains 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 React from "react"; | |
import "./CountryCard.css"; | |
const CountryCard = ({ country }) => { | |
return ( | |
<div className="country-card"> | |
<h3>{country.name}</h3> | |
<div className="country-info-container"> | |
<h4>Capital:</h4> | |
<p>{country.capital}</p> | |
</div> | |
<div className="country-info-container"> | |
<img className="country-flag" src={country.flag} alt="Country flag" /> | |
</div> | |
</div> | |
); | |
}; | |
export default CountryCard; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment