import React from 'react';
import { Button, ButtonProps } from '@material-ui/core';

interface CustomButtonProps extends ButtonProps {
  label: string;
}

export const CustomButton: React.FC<CustomButtonProps> = ({
  classes,
  label,
  style,
  onClick,
  onBlur,
  variant = 'text',
  size = 'small',
  disabled = false,
  type,
  color = 'default',
}) => {
  return (
    <Button
      classes={classes}
      style={{ ...style, textTransform: 'none', width: 'fit-content' }}
      onClick={onClick}
      onBlur={onBlur}
      variant={variant}
      size={size}
      disabled={disabled}
      type={type}
      color={color}
    >
      {label}
    </Button>
  );
};
