import React from "react";
import "./custom-button.style.scss";

const CustomButton = ({ text, onSubmit, ...props }) => {
  return (
    <button
      className="btn"
      onSubmit={(e) => {
        e.preventDefault();
        onSubmit();
      }}
      {...props}
    >
      {text}
    </button>
  );
};

export default CustomButton;
