doc: add active with different casesType

This commit is contained in:
Leon Xu committed 2022-05-03 21:26:46 -07:00
1 parent a3178d8719
commit bc0602081f
1 file changed
+3
+3
View File
@@ -86,18 +86,21 @@ function App() {
<section className="app__stats">
<InfoBox
active={casesType === "cases"}
onClick={(e) => setCasesType("cases")}
title="Coronavirus Cases"
cases={prettyPrintStat(countryInfo.todayCases)}
total={prettyPrintStat(countryInfo.cases)}
/>
<InfoBox
active={casesType === "recovered"}
onClick={(e) => setCasesType("recovered")}
title="Recovered "
cases={prettyPrintStat(countryInfo.todayRecovered)}
total={prettyPrintStat(countryInfo.recovered)}
/>
<InfoBox
active={casesType === "deaths"}
onClick={(e) => setCasesType("deaths")}
title="Deaths"
cases={prettyPrintStat(countryInfo.todayDeaths)}