import { jsx } from "@emotion/core";
import PropTypes from "prop-types";
import MaterialButton from "@material-ui/core/Button";
import { ThemeProvider } from "@material-ui/styles";
import { MaterialTheme } from "../_Themes/index";
var variant = {
  primary: "contained",
  secondary: "text"
};

var ButtonNew = function ButtonNew(_ref) {
  var label = _ref.label,
      onClick = _ref.onClick,
      type = _ref.type,
      href = _ref.href;
  return jsx(ThemeProvider, {
    theme: MaterialTheme
  }, jsx(MaterialButton, {
    onClick: onClick,
    color: "secondary",
    variant: variant[type],
    href: href || undefined
  }, label));
};

ButtonNew.propTypes = {
  label: PropTypes.string,
  onClick: PropTypes.func,
  type: PropTypes.string,
  href: PropTypes.string
};
ButtonNew.defaultProps = {
  label: "Label",
  type: "primary"
};
ButtonNew.displayName = "ButtonNew";
export default ButtonNew;