2016-03-28 16:24:27 +00:00
|
|
|
/* A dummy React component which we use for stubbing out app-level components
|
|
|
|
*/
|
|
|
|
|
2019-09-06 14:04:46 +00:00
|
|
|
import React from 'react';
|
|
|
|
import createReactClass from 'create-react-class';
|
2016-03-28 16:24:27 +00:00
|
|
|
|
2016-03-30 23:48:46 +00:00
|
|
|
module.exports = function(opts) {
|
|
|
|
opts = opts || {};
|
|
|
|
if (!opts.displayName) {
|
|
|
|
opts.displayName = 'StubComponent';
|
|
|
|
}
|
|
|
|
|
|
|
|
if (!opts.render) {
|
|
|
|
opts.render = function() {
|
2017-10-11 16:56:17 +00:00
|
|
|
return <div>{ this.displayName }</div>;
|
|
|
|
};
|
2016-03-30 23:48:46 +00:00
|
|
|
}
|
|
|
|
|
2019-09-06 14:04:46 +00:00
|
|
|
return createReactClass(opts);
|
2016-03-30 23:48:46 +00:00
|
|
|
};
|