Created
October 12, 2021 02:06
-
-
Save haniefhan/49b692aab9883440b717bca39f7e5b3d 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
<template> | |
<div class="mt-20 p-6 rounded-lg bg-white mx-auto max-w-sm text-center shadow-md"> | |
<h1 class="mt-4 text-4xl font-bold">{{ country_rank }}</h1> | |
<h2 class="mt-4 text-3xl font-bold">{{ country_name }}</h2> | |
<h3 class="mt-4 text-xl text-red-400 font-bold tracking-wide">Total Cases : {{ total_cases }}</h3> | |
<table class="mt-4 table w-64 mx-auto" id="cases"> | |
<tr> | |
<td class="text-left font-semibold">New Cases</td> | |
<td class="text-right tracking-wide">{{ new_cases }}</td> | |
</tr> | |
<tr> | |
<td class="text-left font-semibold">Total Deaths</td> | |
<td class="text-right tracking-wide">{{ new_deaths }}</td> | |
</tr> | |
<tr> | |
<td class="text-left font-semibold">Total Deaths</td> | |
<td class="text-right tracking-wide">{{ total_deaths }}</td> | |
</tr> | |
<tr> | |
<td class="text-left font-semibold">Total Recovered</td> | |
<td class="text-right tracking-wide">{{ total_recovered }}</td> | |
</tr> | |
</table> | |
<select class="mt-10 w-64 p-1 border-gray-400 border-2 rounded-lg" id="country_select" v-model="country_select"> | |
<option v-for="(country, key) in countries" :value="country" :key="key"> | |
{{ country }} | |
</option> | |
</select> | |
<button class="mt-6 px-4 py-2 rounded-lg bg-pink-500 text-white shadow-md font-semibold text-sm inline-block tracking-wider hover:bg-pink-400 focus:bg-pink-600" @click="changeCountry">Change Country</button> | |
</div> | |
</template> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment