1
0
mirror of https://github.com/Unleash/unleash.git synced 2025-02-19 00:15:43 +01:00

added some traffic lights

This commit is contained in:
Ivar Østhus 2014-11-13 19:48:30 +01:00
parent 326a4a9290
commit d96ec03bc9
3 changed files with 23 additions and 4 deletions

View File

@ -0,0 +1,16 @@
.toggle-active {
border: 1px solid black;
display: inline-block;
background-color: #3B7908;
border-radius: 50%;
width: 20px;
height: 20px;
}
.toggle-inactive {
border: 1px solid black;
display: inline-block;
background-color: #E7384A;
border-radius: 50%;
width: 20px;
height: 20px;
}

View File

@ -37,11 +37,13 @@ var Feature = React.createClass({
}, },
renderViewMode: function() { renderViewMode: function() {
var strikeThrough = this.props.feature.enabled ? '' : 'strikethrough';
return ( return (
<tr> <tr>
<td className={strikeThrough}> <td width="20">
<span className={this.props.feature.enabled ? "toggle-active" : "toggle-inactive"} title="Status">
</span>
</td>
<td>
{this.props.feature.name} {this.props.feature.name}
</td> </td>
@ -53,7 +55,7 @@ var Feature = React.createClass({
{this.props.feature.strategy} {this.props.feature.strategy}
</td> </td>
<td> <td className="rightify">
<input type='button' value='Edit' onClick={this.toggleEditMode}/> <input type='button' value='Edit' onClick={this.toggleEditMode}/>
</td> </td>
</tr> </tr>

View File

@ -17,6 +17,7 @@ var FeatureList = React.createClass({
<table className='outerborder'> <table className='outerborder'>
<thead> <thead>
<tr> <tr>
<th></th>
<th>Name</th> <th>Name</th>
<th>Description</th> <th>Description</th>
<th>Strategy</th> <th>Strategy</th>