Skip to content

Commit

Permalink
- Clearfix with hooks
Browse files Browse the repository at this point in the history
  • Loading branch information
einazare committed Aug 13, 2019
1 parent e90f74a commit 1c17729
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions src/components/Clearfix/Clearfix.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,9 @@ import React from "react";
import PropTypes from "prop-types";

// mterial-ui components
import withStyles from "@material-ui/core/styles/withStyles";
import { makeStyles } from "@material-ui/core/styles";

const style = {
const styles = {
clearfix: {
"&:after,&:before": {
display: "table",
Expand All @@ -17,13 +17,13 @@ const style = {
}
};

function Clearfix({ ...props }) {
const { classes } = props;
const useStyles = makeStyles(styles);

export default function Clearfix() {
const classes = useStyles();
return <div className={classes.clearfix} />;
}

Clearfix.propTypes = {
classes: PropTypes.object.isRequired
};

export default withStyles(style)(Clearfix);

0 comments on commit 1c17729

Please sign in to comment.