import React, { ReactNode } from "react";
import StyledButton from "./StyledButton";

export type ButtonProps = {
  children: ReactNode | string;
  className?: string;
  disabled?: boolean;
  variant?: "icon";
  clickHandler?: () => void | {};
  props?: any;
};

const Button: React.FC<ButtonProps> = ({
  children,
  className,
  disabled = false,
  clickHandler,
  ...props
}) => {
  return (
    <StyledButton
      className={className}
      onClick={clickHandler}
      role="button"
      disabled={disabled}
      {...props}
    >
      {children}
    </StyledButton>
  );
};

export default Button;
