Skip to content

Instantly share code, notes, and snippets.

@desoga10
Last active June 8, 2019 17:54
Show Gist options
  • Save desoga10/e124de77bcdb58e793dc1a9905fb613c to your computer and use it in GitHub Desktop.
Save desoga10/e124de77bcdb58e793dc1a9905fb613c to your computer and use it in GitHub Desktop.
// Display result in HTML
const outputHtml = fits => {
if (fits.length > 0) {
const html = fits
.map(
fit => `
<div class="row">
<div class="col s12">
<div class="card grey darken-4 darken-1">
<div class="card-content white-text">
<h4 class="card-title m1">${fit.name} (${
fit.abbr
})<span class="blue-text m-4"> ${fit.capital}</span></h4>
<div class="card-action">
<a>Country Code :</a>
<a>${fit.phoneCode}</a>
</div>
</div>
</div>
</div>
</div>
`).join('');
}
};
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment