doc: add props destructuring

This commit is contained in:
Leon Xu committed 2022-05-03 21:23:09 -07:00
1 parent 358d9e70f8
commit ab44bcc82a
1 file changed
+3 -3
+3 -3
View File
@@ -2,9 +2,9 @@ import React from "react";
import "./InfoBox.css";
import { Card, CardContent, Typography } from "@material-ui/core";
function InfoBox({ title, cases, total }) {
function InfoBox({ title, cases, total, ...props }) {
return (
<Card className="infoBox">
<Card onClick={props.onClick} className="infoBox">
<CardContent>
<Typography className="infoBox__title" color="textSecondary">
{title}
@@ -20,4 +20,4 @@ function InfoBox({ title, cases, total }) {
);
}
export default InfoBox;
export default InfoBox;