mirror of
https://github.com/element-hq/element-web
synced 2024-11-23 17:56:01 +03:00
344dac4fb9
We use `export default` begrudgingly here. Ideally we'd use just `export`, though this entire SDK expects things to be exported as a default. Instead of breaking everything, we'll sacrifice our export pattern for a smaller diff - a later commit can always do the default export -> regular export conversion.
20 lines
464 B
JavaScript
20 lines
464 B
JavaScript
/* A dummy React component which we use for stubbing out app-level components
|
|
*/
|
|
|
|
import React from 'react';
|
|
import createReactClass from 'create-react-class';
|
|
|
|
export default function(opts) {
|
|
opts = opts || {};
|
|
if (!opts.displayName) {
|
|
opts.displayName = 'StubComponent';
|
|
}
|
|
|
|
if (!opts.render) {
|
|
opts.render = function() {
|
|
return <div>{ this.displayName }</div>;
|
|
};
|
|
}
|
|
|
|
return createReactClass(opts);
|
|
};
|