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.
2020-09-02 22:56:40 +03:00

26 lines
590 B
JavaScript

import { Button as AntButton } from 'antd';
import { useStatus } from 'client/hooks/useStatus';
import { Status } from 'core/types/elements';
import React from 'react';
import colors from 'client/UIKit/colors';
const Button = ({ type, name, text, onClick }) => {
const { status } = useStatus(name);
return (
<AntButton
style={{
backgroundColor: colors.primary[0],
borderColor: colors.primary[0]
}}
type={type}
disabled={status === Status.Disabled}
onClick={onClick}
>
{text}
</AntButton>
);
};
export default Button;