Skip to content

Commit

Permalink
reverting back to old
Browse files Browse the repository at this point in the history
  • Loading branch information
Manu committed Jun 12, 2019
1 parent 5656561 commit 54a5f4e
Showing 1 changed file with 5 additions and 12 deletions.
17 changes: 5 additions & 12 deletions src/components/Badge/Badge.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -3,19 +3,12 @@ import React from "react";
import PropTypes from "prop-types";

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

import badgeStyle from "assets/jss/material-kit-react/components/badgeStyle.jsx";

const makeComponentStyles = makeStyles(() => ({
...badgeStyle
}));

function Badge({ ...props }) {
const { color, children } = props;

const classes = makeComponentStyles();

const { classes, color, children } = props;
return (
<span className={classes.badge + " " + classes[color]}>{children}</span>
);
Expand All @@ -26,6 +19,7 @@ Badge.defaultProps = {
};

Badge.propTypes = {
classes: PropTypes.object.isRequired,
color: PropTypes.oneOf([
"primary",
"warning",
Expand All @@ -34,8 +28,7 @@ Badge.propTypes = {
"info",
"rose",
"gray"
]),
children: PropTypes.node
])
};

export default Badge;
export default withStyles(badgeStyle)(Badge);

0 comments on commit 54a5f4e

Please sign in to comment.