import { Button as PrimeButton, ButtonProps } from 'primereact/button';
import React from 'react';

interface CustomButtonProps extends ButtonProps {}

const Button: React.FC<CustomButtonProps> = ({ style, className, disabled, ...buttonProps }) => {
  const disabledClass = disabled
    ? 'bg-gray-500 hover:bg-gray-500 text-white'
    : 'bg-teal-500 hover:bg-white hover:text-teal-500';
  return (
    <PrimeButton
      {...buttonProps}
      unstyled
      disabled={disabled}
      className={` py-2 px-4 min-w-1 mt-4 text-white border-2 border-teal-500 rounded-md transition-colors ${disabledClass} ${className} `}
      style={{ ...style, fontSize: '0.75rem', fontWeight: '700' }}
    />
  );
};

export default Button;
