2016-03-28 18:24:27 +02:00
|
|
|
/* A dummy React component which we use for stubbing out app-level components
|
|
|
|
*/
|
|
|
|
|
2019-09-06 16:04:46 +02:00
|
|
|
import React from 'react';
|
2016-03-28 18:24:27 +02:00
|
|
|
|
2021-06-29 14:11:58 +02:00
|
|
|
export default function({ displayName = "StubComponent", render } = {}) {
|
2020-08-29 13:14:16 +02:00
|
|
|
if (!render) {
|
|
|
|
render = function() {
|
2020-08-29 14:02:45 +02:00
|
|
|
return <div>{ displayName }</div>;
|
2017-10-11 18:56:17 +02:00
|
|
|
};
|
2016-03-31 01:48:46 +02:00
|
|
|
}
|
|
|
|
|
2020-08-29 13:14:16 +02:00
|
|
|
return class extends React.Component {
|
|
|
|
static displayName = displayName;
|
|
|
|
|
|
|
|
render() {
|
|
|
|
return render();
|
|
|
|
}
|
|
|
|
};
|
2020-01-13 21:28:33 +01:00
|
|
|
}
|