mirror of
https://github.com/ascribe/onion.git
synced 2024-11-15 09:35:10 +01:00
26 lines
560 B
JavaScript
26 lines
560 B
JavaScript
'use strict';
|
|
|
|
import React from 'react';
|
|
|
|
|
|
let TableItemCheckbox = React.createClass({
|
|
propTypes: {
|
|
editionId: React.PropTypes.number,
|
|
pieceId: React.PropTypes.number,
|
|
selectItem: React.PropTypes.func,
|
|
selected: React.PropTypes.bool
|
|
},
|
|
|
|
selectItem() {
|
|
this.props.selectItem(this.props.pieceId, this.props.editionId);
|
|
},
|
|
|
|
render() {
|
|
return (
|
|
<input type="checkbox" onChange={this.selectItem} checked={this.props.selected}/>
|
|
);
|
|
}
|
|
});
|
|
|
|
export default TableItemCheckbox;
|