From ff7e7004275b2ef2e53a0c60f179aabf15fc0ab1 Mon Sep 17 00:00:00 2001 From: Ben Warzeski Date: Fri, 1 Dec 2023 04:20:13 +0000 Subject: [PATCH] feat: allow plugin.modal to open a fullscreen modal --- .../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 }
+ : ( +