forked from module-federation/module-federation-examples
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathCard.js
More file actions
38 lines (34 loc) · 1.03 KB
/
Card.js
File metadata and controls
38 lines (34 loc) · 1.03 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
import React from "react";
// nodejs library that concatenates classes
import classNames from "classnames";
// nodejs library to set properties for components
import PropTypes from "prop-types";
// @material-ui/core components
import { makeStyles } from "@material-ui/core/styles";
// @material-ui/icons
// core components
import styles from "../../assets/jss/material-dashboard-react/components/cardStyle.js";
const useStyles = makeStyles(styles);
export default function Card(props) {
const classes = useStyles();
const { className, children, plain, profile, chart, ...rest } = props;
const cardClasses = classNames({
[classes.card]: true,
[classes.cardPlain]: plain,
[classes.cardProfile]: profile,
[classes.cardChart]: chart,
[className]: className !== undefined,
});
return (
<div className={cardClasses} {...rest}>
{children}
</div>
);
}
Card.propTypes = {
className: PropTypes.string,
plain: PropTypes.bool,
profile: PropTypes.bool,
chart: PropTypes.bool,
children: PropTypes.node,
};