mirror of
https://github.com/element-hq/element-web
synced 2024-11-24 18:25:49 +03:00
20 lines
452 B
JavaScript
20 lines
452 B
JavaScript
/* A dummy React component which we use for stubbing out app-level components
|
|
*/
|
|
|
|
import React from 'react';
|
|
|
|
export default function({ displayName = "StubComponent", render } = {}) {
|
|
if (!render) {
|
|
render = function() {
|
|
return <div>{ displayName }</div>;
|
|
};
|
|
}
|
|
|
|
return class extends React.Component {
|
|
static displayName = displayName;
|
|
|
|
render() {
|
|
return render();
|
|
}
|
|
};
|
|
}
|