2016-03-28 18:24:27 +02:00
|
|
|
/* A dummy React component which we use for stubbing out app-level components
|
|
|
|
*/
|
|
|
|
'use strict';
|
|
|
|
|
2017-10-11 18:56:17 +02:00
|
|
|
const React = require('react');
|
2016-03-28 18:24:27 +02:00
|
|
|
|
2016-03-31 01:48:46 +02:00
|
|
|
module.exports = function(opts) {
|
|
|
|
opts = opts || {};
|
|
|
|
if (!opts.displayName) {
|
|
|
|
opts.displayName = 'StubComponent';
|
|
|
|
}
|
|
|
|
|
|
|
|
if (!opts.render) {
|
|
|
|
opts.render = function() {
|
2017-10-11 18:56:17 +02:00
|
|
|
return <div>{ this.displayName }</div>;
|
|
|
|
};
|
2016-03-31 01:48:46 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
return React.createClass(opts);
|
|
|
|
};
|