import React from 'react';
require('./index.css');

export default class ButtonComponent extends React.Component{
    constructor(props){
        super(props);
    }

    render(){
        let props = this.props;
        let classInfo = props.classInfo && props.classInfo.className ? props.classInfo.className : '';
        let colorClass = props.classInfo && props.classInfo.colorInfo ? props.classInfo.colorInfo : "col333";
        let fontClass = props.classInfo && props.classInfo.fontInfo ? props.classInfo.fontInfo : "font32";
        return(
            <div className={`buttonComponent ${fontClass} ${colorClass} ${classInfo}`} style={props.style} onClick={()=>props.option()}>
                {props.text}
            </div>
        )
    }
}