Last active
June 8, 2019 17:54
-
-
Save desoga10/e124de77bcdb58e793dc1a9905fb613c to your computer and use it in GitHub Desktop.
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
// 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