This repository has been archived on 2025-05-09. You can view files and clone it, but cannot push or open issues or pull requests.
Владислав Чикалкин 566ebfee40 add status loading
2020-09-24 15:02:48 +03:00

19 lines
426 B
JavaScript

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;