/**
 * @file FootBtn.tsx
 * @author lvzhiyi lihuanji
 *
 * 固定定位最下方按钮
 */

import React from 'react';
import classnames from 'classnames';
import './style';

interface FootBtnFace {
    /**
     * 点击回调
     */
    onClick?: React.ReactEventHandler<EventTarget>;
    /**
     *  class
     */
    className?: string;
    /**
     * 子节点
     */
    children?: React.ReactNode;

    style?: object;
}

const FootBtn: React.StatelessComponent<FootBtnFace> = props => {
    const { className, onClick, style } = props;
    return (
        <div className="foot-btn-wrapper" style={style}>
            <div className={classnames('FootBtn', className)} onClick={onClick}>
                {props.children}
            </div>
        </div>
    );
};

FootBtn.defaultProps = {
    onClick: () => {}
};

export default FootBtn;
