Skip to content

Commit e33717d

Browse files
committed
- all cmponents are on hooks, minus the tasks component
1 parent 2284b8b commit e33717d

File tree

18 files changed

+428
-453
lines changed

18 files changed

+428
-453
lines changed

src/components/Footer/Footer.js

Lines changed: 6 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -2,14 +2,16 @@
22
import React from "react";
33
import PropTypes from "prop-types";
44
// @material-ui/core components
5-
import withStyles from "@material-ui/core/styles/withStyles";
5+
import { makeStyles } from "@material-ui/core/styles";
66
import ListItem from "@material-ui/core/ListItem";
77
import List from "@material-ui/core/List";
88
// core components
9-
import footerStyle from "assets/jss/material-dashboard-react/components/footerStyle.js";
9+
import styles from "assets/jss/material-dashboard-react/components/footerStyle.js";
1010

11-
function Footer(props) {
12-
const { classes } = props;
11+
const useStyles = makeStyles(styles);
12+
13+
export default function Footer(props) {
14+
const classes = useStyles();
1315
return (
1416
<footer className={classes.footer}>
1517
<div className={classes.container}>
@@ -54,9 +56,3 @@ function Footer(props) {
5456
</footer>
5557
);
5658
}
57-
58-
Footer.propTypes = {
59-
classes: PropTypes.object.isRequired
60-
};
61-
62-
export default withStyles(footerStyle)(Footer);

src/components/Grid/GridContainer.js

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -2,18 +2,21 @@ import React from "react";
22
// nodejs library to set properties for components
33
import PropTypes from "prop-types";
44
// @material-ui/core components
5-
import withStyles from "@material-ui/core/styles/withStyles";
5+
import { makeStyles } from "@material-ui/core/styles";
66
import Grid from "@material-ui/core/Grid";
77

8-
const style = {
8+
const styles = {
99
grid: {
1010
margin: "0 -15px !important",
1111
width: "unset"
1212
}
1313
};
1414

15-
function GridContainer(props) {
16-
const { classes, children, ...rest } = props;
15+
const useStyles = makeStyles(styles);
16+
17+
export default function GridContainer(props) {
18+
const classes = useStyles();
19+
const { children, ...rest } = props;
1720
return (
1821
<Grid container {...rest} className={classes.grid}>
1922
{children}
@@ -22,8 +25,5 @@ function GridContainer(props) {
2225
}
2326

2427
GridContainer.propTypes = {
25-
classes: PropTypes.object,
2628
children: PropTypes.node
2729
};
28-
29-
export default withStyles(style)(GridContainer);

src/components/Grid/GridItem.js

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -2,17 +2,20 @@ import React from "react";
22
// nodejs library to set properties for components
33
import PropTypes from "prop-types";
44
// @material-ui/core components
5-
import withStyles from "@material-ui/core/styles/withStyles";
5+
import { makeStyles } from "@material-ui/core/styles";
66
import Grid from "@material-ui/core/Grid";
77

8-
const style = {
8+
const styles = {
99
grid: {
1010
padding: "0 15px !important"
1111
}
1212
};
1313

14-
function GridItem(props) {
15-
const { classes, children, ...rest } = props;
14+
const useStyles = makeStyles(styles);
15+
16+
export default function GridItem(props) {
17+
const classes = useStyles();
18+
const { children, ...rest } = props;
1619
return (
1720
<Grid item {...rest} className={classes.grid}>
1821
{children}
@@ -21,8 +24,5 @@ function GridItem(props) {
2124
}
2225

2326
GridItem.propTypes = {
24-
classes: PropTypes.object,
2527
children: PropTypes.node
2628
};
27-
28-
export default withStyles(style)(GridItem);

0 commit comments

Comments
 (0)