1
0
REI-Fixed/app/assets/javascripts/components/components/status_list.jsx

31 lines
847 B
React
Raw Normal View History

import Status from './status';
import ImmutablePropTypes from 'react-immutable-proptypes';
import PureRenderMixin from 'react-addons-pure-render-mixin';
const StatusList = React.createClass({
propTypes: {
statuses: ImmutablePropTypes.list.isRequired,
onReply: React.PropTypes.func,
onReblog: React.PropTypes.func,
onFavourite: React.PropTypes.func
},
mixins: [PureRenderMixin],
render () {
return (
<div style={{ overflowY: 'scroll', flex: '1 1 auto' }} className='scrollable'>
<div>
{this.props.statuses.map((status) => {
return <Status key={status.get('id')} status={status} onReply={this.props.onReply} onReblog={this.props.onReblog} onFavourite={this.props.onFavourite} />;
})}
</div>
</div>
);
}
});
export default StatusList;