2016-03-29 00:24:27 +08:00
|
|
|
/* A dummy React component which we use for stubbing out app-level components
|
|
|
|
*/
|
|
|
|
|
2019-09-06 22:04:46 +08:00
|
|
|
import React from 'react';
|
|
|
|
import createReactClass from 'create-react-class';
|
2016-03-29 00:24:27 +08:00
|
|
|
|
2019-12-20 08:45:24 +08:00
|
|
|
export default function(opts) {
|
2016-03-31 07:48:46 +08:00
|
|
|
opts = opts || {};
|
|
|
|
if (!opts.displayName) {
|
|
|
|
opts.displayName = 'StubComponent';
|
|
|
|
}
|
|
|
|
|
|
|
|
if (!opts.render) {
|
|
|
|
opts.render = function() {
|
2017-10-12 00:56:17 +08:00
|
|
|
return <div>{ this.displayName }</div>;
|
|
|
|
};
|
2016-03-31 07:48:46 +08:00
|
|
|
}
|
|
|
|
|
2019-09-06 22:04:46 +08:00
|
|
|
return createReactClass(opts);
|
2020-01-14 04:28:33 +08:00
|
|
|
}
|