From 4e1346716b96238ac6898ac2bac159a08c223da0 Mon Sep 17 00:00:00 2001 From: Ben Warzeski Date: Mon, 4 Dec 2023 13:18:59 -0500 Subject: [PATCH] feat: allow plugin.modal to open a fullscreen modal (#1243) --- .../course/sequence/Unit/ContentIFrame.jsx | 56 +++++++++++++------ .../sequence/Unit/ContentIFrame.test.jsx | 53 +++++++++++++++++- 2 files changed, 89 insertions(+), 20 deletions(-) diff --git a/src/courseware/course/sequence/Unit/ContentIFrame.jsx b/src/courseware/course/sequence/Unit/ContentIFrame.jsx index ab2652fdcd..1e6e4b98d9 100644 --- a/src/courseware/course/sequence/Unit/ContentIFrame.jsx +++ b/src/courseware/course/sequence/Unit/ContentIFrame.jsx @@ -3,7 +3,7 @@ import React from 'react'; import { ErrorPage } from '@edx/frontend-platform/react'; import { StrictDict } from '@edx/react-unit-test-utils'; -import { Modal } from '@edx/paragon'; +import { ModalDialog, Modal } from '@edx/paragon'; import PageLoading from '../../../../generic/PageLoading'; import * as hooks from './hooks'; @@ -64,6 +64,21 @@ const ContentIFrame = ({ onLoad: handleIFrameLoad, }; + let modalContent; + if (modalOptions.isOpen) { + modalContent = modalOptions.body + ?
{ modalOptions.body }
+ : ( +