1
0
mirror of https://github.com/Unleash/unleash.git synced 2024-10-18 20:09:08 +02:00
unleash.unleash/public/js/components/feature/Feature.jsx
2020-02-20 08:30:15 +01:00

35 lines
982 B
JavaScript

var React = require('react');
var Feature = React.createClass({
onChange: function(event) {
this.props.onChange({
name: this.props.feature.name,
field: 'enabled',
value: event.target.checked
});
},
render: function() {
return (
<div className='line mal'>
<div className='unit r-size1of5'>
<input type='checkbox' checked={this.props.feature.enabled} onChange={this.onChange} />
</div>
<div className='unit r-size1of5'>
{this.props.feature.name}
</div>
<div className='unit r-size2of5 opaque smalltext truncate'>
{this.props.feature.description || '\u00a0'}
</div>
<div className='unit'>
{this.props.feature.strategy}
</div>
</div>
);
}
});
module.exports = Feature;