import React, {Component} from "react";
import classNames from 'classnames';

import styles from "./index.less";


class ModalFooter extends Component {


    render() {
        const {btnName, handleCancel, handleConfirm} = this.props;
        const cancelClass = {
            overflow: "hidden",
            position: "relative",
            'WebkitTransition':'color .2s linear,background-color .3s linear',
            'transition': 'color .2s linear,background-color .3s linear',
            'color':'#8e8e93',
            'backgroundColor': 'transparent'
        }
        const btnClass = classNames(`${styles.btn} ${styles[btnName] || styles['primary']}`);

        return (
            <div className={styles['modal-footer']}>
                <button className={btnClass} onClick={handleConfirm}>确定</button>
                <button className={btnClass} style={cancelClass} onClick={handleCancel}>取消</button>
            </div>
        );
    }
}

export default ModalFooter;