element-web/themes/base/views/molecules/MEmoteTile.js

21 lines
558 B
JavaScript
Raw Normal View History

2015-06-16 17:18:34 +00:00
var React = require('react');
var MEmoteTileController = require("../../../../src/controllers/molecules/MEmoteTile");
2015-06-16 17:18:34 +00:00
module.exports = React.createClass({
displayName: 'MEmoteTile',
mixins: [MEmoteTileController],
2015-06-16 17:18:34 +00:00
render: function() {
var mxEvent = this.props.mxEvent;
var content = mxEvent.getContent();
var name = mxEvent.sender ? mxEvent.sender.name : mxEvent.getSender();
return (
<span className="mx_MEmoteTile">
{name} {content.body}
</span>
);
},
});