fix: change className to use rendering

This commit is contained in:
Leon Xu committed 2022-05-03 21:29:06 -07:00
1 parent bc0602081f
commit 184b075ab4
1 file changed
+5 -2
+5 -2
View File
@@ -2,9 +2,12 @@ import React from "react";
import "./InfoBox.css";
import { Card, CardContent, Typography } from "@material-ui/core";
function InfoBox({ title, cases, total, ...props }) {
function InfoBox({ title, cases, active, total, ...props }) {
return (
<Card onClick={props.onClick} className="infoBox">
<Card
onClick={props.onClick}
className={`infoBox ${active && "infoBox--selected"}`}
>
<CardContent>
<Typography className="infoBox__title" color="textSecondary">
{title}