import React from 'react';
import { Button } from 'antd';
import './index.scss';

/**
 * 底部操作栏
 * @param okText
 * @param cancelText
 * @param onOk
 * @param onCancel
 * @return {*}
 * @constructor
 */
const Footer = ({ okText, cancelText, onOk, onCancel }: IFooter) => {
  return (
    <div className="footer">
      <Button onClick={() => onCancel()}>{cancelText}</Button>
      <Button onClick={() => onOk()} type="primary">
        {okText}
      </Button>
    </div>
  );
};

export default Footer;
export interface IFooter {
  okText: string;
  cancelText: string;
  onOk: Function;
  onCancel: Function;
}
