From b036b7f736ebf13a8b077ef920d012d1b554da59 Mon Sep 17 00:00:00 2001 From: Troels Ugilt Jensen <6103205+tuj@users.noreply.github.com> Date: Wed, 10 Apr 2024 13:40:15 +0200 Subject: [PATCH] 398: Readded code --- src/components/slide/preview/remote-component-wrapper.jsx | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/components/slide/preview/remote-component-wrapper.jsx b/src/components/slide/preview/remote-component-wrapper.jsx index 85e71239..542cc02f 100644 --- a/src/components/slide/preview/remote-component-wrapper.jsx +++ b/src/components/slide/preview/remote-component-wrapper.jsx @@ -17,6 +17,7 @@ import "./remote-component-wrapper.scss"; * @param {string} props.orientation Display orientation or horizontal. * @param {boolean} props.showPreview Whether to display the prevoew. * @param {boolean} props.closeButton Display close button on preview + * @param {Function} props.closeCallback Close button callback on preview * @returns {object} The component. */ function RemoteComponentWrapper({ @@ -26,7 +27,8 @@ function RemoteComponentWrapper({ themeData, showPreview, orientation, - closeButton + closeButton, + closeCallback, }) { const { t } = useTranslation("common"); const [remoteComponentSlide, setRemoteComponentSlide] = useState(null); @@ -119,6 +121,7 @@ function RemoteComponentWrapper({ RemoteComponentWrapper.defaultProps = { orientation: "", closeButton: false, + closeCallback: () => {}, mediaData: null, themeData: {}, }; @@ -133,6 +136,7 @@ RemoteComponentWrapper.propTypes = { themeData: PropTypes.shape({ css: PropTypes.string, }), + closeCallback: PropTypes.func, showPreview: PropTypes.bool.isRequired, closeButton: PropTypes.bool, orientation: PropTypes.string,