doc: add props destructuring
This commit is contained in:
1 parent
358d9e70f8
commit
ab44bcc82a
1 file changed
+3
-3
+3
-3
@@ -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;
|
||||
Reference in new issue
Block a user