-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathCardAvatar.js
More file actions
36 lines (32 loc) · 1.02 KB
/
CardAvatar.js
File metadata and controls
36 lines (32 loc) · 1.02 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
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/cardAvatarStyle.js";
const useStyles = makeStyles(styles);
export default function CardAvatar(props) {
const classes = useStyles();
const { children, className, plain, profile, ...rest } = props;
const cardAvatarClasses = classNames({
[classes.cardAvatar]: true,
[classes.cardAvatarProfile]: profile,
[classes.cardAvatarPlain]: plain,
[className]: className !== undefined
});
return (
<div className={cardAvatarClasses} {...rest}>
{children}
</div>
);
}
CardAvatar.propTypes = {
children: PropTypes.node.isRequired,
className: PropTypes.string,
profile: PropTypes.bool,
plain: PropTypes.bool
};