element-web/src/views/molecules/RoomTile.js

22 lines
633 B
JavaScript
Raw Normal View History

var React = require('react');
var classNames = require('classnames');
var RoomTileController = require("../../controllers/molecules/RoomTile");
module.exports = React.createClass({
displayName: 'RoomTile',
mixins: [RoomTileController],
render: function() {
var classes = classNames({
'mx_RoomTile': true,
2015-06-18 15:35:17 +02:00
'selected': this.props.selected,
'unread': this.props.unread
});
return (
<div className={classes} onClick={this.onClick}>
2015-06-12 15:59:33 +02:00
<div className="mx_RoomTile_name">{this.props.room.name}</div>
</div>
);
}
});