import {Button, Space} from 'antd';
import css from './index.module.css';
import {FC} from 'react';

type Props = {
  onClose?: () => void;
  isLoading?: boolean;
  btnText?: string;
};

const ModalBtnGroup: FC<Props> = function ({isLoading, btnText}) {
  return (
    <Space className={css.dialogBtnGroup} data-testid='modal_btn_group'>
      <Button
        loading={isLoading}
        type='primary'
        htmlType='submit'
        size='large'
        shape='round'
      >
        {btnText ?? '确定'}
      </Button>
    </Space>
  );
};

export default ModalBtnGroup;
