element-web/test/components/stub-component.js
Richard van der Hoff dc5c0928b2 Some basic tests for MessagePanel
Check that it puts the read marker in the right place, and check that the
animation works.

... all of which has been surprisingly painful.
2016-03-31 00:48:46 +01:00

20 lines
430 B
JavaScript

/* A dummy React component which we use for stubbing out app-level components
*/
'use strict';
var React = require('react');
module.exports = function(opts) {
opts = opts || {};
if (!opts.displayName) {
opts.displayName = 'StubComponent';
}
if (!opts.render) {
opts.render = function() {
return <div>{this.displayName}</div>;
}
}
return React.createClass(opts);
};