mirror of
https://github.com/vector-im/element-web.git
synced 2024-11-30 06:21:09 +08:00
21 lines
450 B
JavaScript
21 lines
450 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();
|
|
}
|
|
};
|
|
}
|