import { Component, render, createElement } from 'rax';
import './index.less';
import App from '../App';
import config from '../../../config';

export default class TexpkCfgItem extends Component {

    constructor(props) {
        super(props);
        this.state = {
            checked: false
        }
    }

    configDetails = () => {
        App.inst.showConfigure(this.props.fileName, this.props.fileName.slice(0, this.props.fileName.lastIndexOf(".")))
        App.inst.setState({
            curConfig: this.props.fileName
        })
    }

    render() {
        return (
            <div className="config_item" onClick={this.configDetails} style={{ backgroundColor: this.props.bgColor }}>{this.props.fileName}</div>
        )
    }
}