import { Button as AntButton } from 'antd';
import { Status } from 'core/types/statuses';
import React from 'react';

const Button = ({ status, onClick, text, ...props }) => {
  return (
    <AntButton
      {...props}
      disabled={status === Status.Disabled || status === Status.Loading}
      loading={status === Status.Loading}
      onClick={onClick}
    >
      {text}
    </AntButton>
  );
};

export default Button;
