UNPKG

keystone

Version:

Web Application Framework and Admin GUI / Content Management System built on Express.js and Mongoose

29 lines (26 loc) 698 B
import React from 'react'; import Checkbox from '../../components/Checkbox'; import ItemsTableCell from '../../components/ItemsTableCell'; import ItemsTableValue from '../../components/ItemsTableValue'; var BooleanColumn = React.createClass({ displayName: 'BooleanColumn', propTypes: { col: React.PropTypes.object, data: React.PropTypes.object, }, renderValue () { return ( <ItemsTableValue truncate={false} field={this.props.col.type}> <Checkbox readonly checked={this.props.data.fields[this.props.col.path]} /> </ItemsTableValue> ); }, render () { return ( <ItemsTableCell> {this.renderValue()} </ItemsTableCell> ); }, }); module.exports = BooleanColumn;