1
0
mirror of https://github.com/matrix-org/matrix-react-sdk.git synced 2025-07-21 07:42:09 +03:00
Files
matrix-react-sdk/test/components/stub-component.js
2019-09-06 15:04:46 +01:00

21 lines
466 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';
module.exports = function(opts) {
opts = opts || {};
if (!opts.displayName) {
opts.displayName = 'StubComponent';
}
if (!opts.render) {
opts.render = function() {
return <div>{ this.displayName }</div>;
};
}
return createReactClass(opts);
};