Skip to content

Instantly share code, notes, and snippets.

@Dromediansk
Created December 15, 2019 04:54
Show Gist options
  • Save Dromediansk/fa45bf1b4f2b799bce99c3bdfd2b401e to your computer and use it in GitHub Desktop.
Save Dromediansk/fa45bf1b4f2b799bce99c3bdfd2b401e to your computer and use it in GitHub Desktop.
CountryCard react-tips
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