import React, { PropTypes } from 'react'

ToggleButton.propTypes = {
    checked: PropTypes.bool.isRequired,
    onToggle: PropTypes.func.isRequired,
    text: PropTypes.string.isRequired
}

export default function ToggleButton({ checked, onToggle, text }) {
    return (
        <div className={"btn btn-toggle " + (checked ? "btn-primary" : "btn-default")} onClick={onToggle}>
            <i className={"fa fa-fw " + (checked ? "fa-check-square-o" : "fa-square-o")}/>
            &nbsp;
            {text}
        </div>
    )
}
er'>
<tr>
<td class='logo' rowspan='2'><a href='/cgit.cgi/'><img src='/cgit.png' alt='cgit logo'/></a></td>
<td class='main'><a href='/cgit.cgi/'>index</a> : <a title='iCE40/yosys' href='/cgit.cgi/iCE40/yosys/'>iCE40/yosys</a></td><td class='form'><form method='get'>
<input type='hidden' name='id' value='a076052fe423e262e00e75756f5f1b24ea461783'/><select name='h' onchange='this.form.submit();'>
<option value='master' selected='selected'>master</option>
</select> <input type='submit' value='switch'/></form></td></tr>
<tr><td class='sub'>clone of https://github.com/YosysHQ/yosys</td><td class='sub right'></td></tr></table>
<table class='tabs'><tr><td>
<a href='/cgit.cgi/iCE40/yosys/about/'>about</a><a href='/cgit.cgi/iCE40/yosys/'>summary</a><a href='/cgit.cgi/iCE40/yosys/refs/?id=a076052fe423e262e00e75756f5f1b24ea461783'>refs</a><a href='/cgit.cgi/iCE40/yosys/log/tests/lut/check_map_lut6.ys'>log</a><a class='active' href='/cgit.cgi/iCE40/yosys/tree/tests/lut/check_map_lut6.ys?id=a076052fe423e262e00e75756f5f1b24ea461783'>tree</a><a href='/cgit.cgi/iCE40/yosys/commit/tests/lut/check_map_lut6.ys?id=a076052fe423e262e00e75756f5f1b24ea461783'>commit</a><a href='/cgit.cgi/iCE40/yosys/diff/tests/lut/check_map_lut6.ys?id=a076052fe423e262e00e75756f5f1b24ea461783'>diff</a><a href='/cgit.cgi/iCE40/yosys/stats/tests/lut/check_map_lut6.ys'>stats</a></td><td class='form'><form class='right' method='get' action='/cgit.cgi/iCE40/yosys/log/tests/lut/check_map_lut6.ys'>
<input type='hidden' name='id' value='a076052fe423e262e00e75756f5f1b24ea461783'/><select name='qt'>
<option value='grep'>log msg</option>
<option value='author'>author</option>
<option value='committer'>committer</option>
<option value='range'>range</option>
</select>
<input class='txt' type='search' size='10' name='q' value=''/>
<input type='submit' value='search'/>
</form>
</td></tr></table>
<div class='path'>path: <a href='/cgit.cgi/iCE40/yosys/tree/?id=a076052fe423e262e00e75756f5f1b24ea461783'>root</a>/<a href='/cgit.cgi/iCE40/yosys/tree/tests?id=a076052fe423e262e00e75756f5f1b24ea461783'>tests</a>/<a href='/cgit.cgi/iCE40/yosys/tree/tests/lut?id=a076052fe423e262e00e75756f5f1b24ea461783'>lut</a>/<a href='/cgit.cgi/iCE40/yosys/tree/tests/lut/check_map_lut6.ys?id=a076052fe423e262e00e75756f5f1b24ea461783'>check_map_lut6.ys</a></div><div class='content'>blob: 8a32e4d106bc681ad9320bae2310dc5af47e25c8 (<a href='/cgit.cgi/iCE40/yosys/plain/tests/lut/check_map_lut6.ys?id=a076052fe423e262e00e75756f5f1b24ea461783'>plain</a>)
<table summary='blob content' class='blob'>
<tr><td class='linenumbers'><pre><a id='n1' href='#n1'>1</a>
<a id='n2' href='#n2'>2</a>
<a id='n3' href='#n3'>3</a>
<a id='n4' href='#n4'>4</a>
<a id='n5' href='#n5'>5</a>
<a id='n6' href='#n6'>6</a>
<a id='n7' href='#n7'>7</a>
</pre></td>
<td class='lines'><pre><code>