1
0
mirror of https://github.com/ascribe/onion.git synced 2024-11-15 09:35:10 +01:00
onion/js/components/ascribe_table/table_item.js

34 lines
1.1 KiB
JavaScript
Raw Normal View History

import React from 'react';
import TableColumnContentModel from '../../models/table_column_content_model';
2015-05-26 20:20:17 +02:00
import TableItemWrapper from './table_item_wrapper';
2015-05-20 16:44:45 +02:00
let TableItem = React.createClass({
2015-05-20 14:48:57 +02:00
propTypes: {
columnList: React.PropTypes.arrayOf(React.PropTypes.instanceOf(TableColumnContentModel)),
2015-05-26 16:48:48 +02:00
columnContent: React.PropTypes.object,
onClick: React.PropTypes.func, // See: https://facebook.github.io/react/tips/expose-component-functions.html
2015-06-01 09:05:30 +02:00
className: React.PropTypes.string
2015-05-20 14:48:57 +02:00
},
2015-05-20 12:09:35 +02:00
render() {
return (
<div className={this.props.className + ' col-xs-12 col-sm-12 col-md-12 col-lg-12 ascribe-table-item'}
2015-05-26 16:48:48 +02:00
onClick={this.props.onClick}>
2015-05-20 12:09:35 +02:00
<div className="row">
2015-05-26 20:20:17 +02:00
<TableItemWrapper
columnList={this.props.columnList}
columnContent={this.props.columnContent}
columnWidth={12}>
</TableItemWrapper>
2015-05-20 12:09:35 +02:00
</div>
</div>
);
}
});
2015-05-20 16:44:45 +02:00
export default TableItem;