diff --git a/shell/src/PluginLoader.js b/shell/src/PluginLoader.js index 426fca57..bec41c23 100644 --- a/shell/src/PluginLoader.js +++ b/shell/src/PluginLoader.js @@ -4,7 +4,7 @@ import postRobot from 'post-robot' import PropTypes from 'prop-types' import React, { useCallback, useEffect, useRef, useState } from 'react' -const PluginInner = ({ +const PluginResizeInner = ({ D2App, config, propsFromParent, @@ -63,6 +63,41 @@ const PluginInner = ({ ) } +PluginResizeInner.propTypes = { + D2App: PropTypes.object, + config: PropTypes.object, + propsFromParent: PropTypes.object, + resizePluginHeight: PropTypes.func, + resizePluginWidth: PropTypes.func, +} + +const PluginInner = ({ + D2App, + config, + propsFromParent, + resizePluginHeight, + resizePluginWidth, +}) => { + if (!resizePluginHeight && !resizePluginWidth) { + return ( + + ) + } + return ( + + ) +} + PluginInner.propTypes = { D2App: PropTypes.object, config: PropTypes.object,