@@ -3,7 +3,7 @@ import React from 'react';
3
3
4
4
import { ErrorPage } from '@edx/frontend-platform/react' ;
5
5
import { StrictDict } from '@edx/react-unit-test-utils' ;
6
- import { ModalDialog , Modal } from '@openedx/paragon' ;
6
+ import { ModalDialog } from '@openedx/paragon' ;
7
7
import { PluginSlot } from '@openedx/frontend-plugin-framework' ;
8
8
9
9
import PageLoading from '@src/generic/PageLoading' ;
@@ -66,21 +66,6 @@ const ContentIFrame = ({
66
66
onLoad : handleIFrameLoad ,
67
67
} ;
68
68
69
- let modalContent ;
70
- if ( modalOptions . isOpen ) {
71
- modalContent = modalOptions . body
72
- ? < div className = "unit-modal" > { modalOptions . body } </ div >
73
- : (
74
- < iframe
75
- title = { modalOptions . title }
76
- allow = { IFRAME_FEATURE_POLICY }
77
- frameBorder = "0"
78
- src = { modalOptions . url }
79
- style = { { width : '100%' , height : modalOptions . height } }
80
- />
81
- ) ;
82
- }
83
-
84
69
return (
85
70
< >
86
71
{ ( shouldShowContent && ! hasLoaded ) && (
@@ -101,28 +86,28 @@ const ContentIFrame = ({
101
86
< iframe title = { title } { ...contentIFrameProps } data-testid = { testIDs . contentIFrame } />
102
87
</ div >
103
88
) }
104
- { modalOptions . isOpen && ( modalOptions . isFullscreen
105
- ? (
106
- < ModalDialog
89
+ { modalOptions . isOpen &&
90
+ ( < ModalDialog
107
91
dialogClassName = "modal-lti"
108
92
onClose = { handleModalClose }
109
- size = " fullscreen"
93
+ size = { modalOptions . isFullscreen ? ' fullscreen' : 'md' }
110
94
isOpen
111
95
hasCloseButton = { false }
112
96
>
113
97
< ModalDialog . Body className = { modalOptions . modalBodyClassName } >
114
- { modalContent }
98
+ { modalOptions . body
99
+ ? < div className = "unit-modal" > { modalOptions . body } </ div >
100
+ : (
101
+ < iframe
102
+ title = { modalOptions . title }
103
+ allow = { IFRAME_FEATURE_POLICY }
104
+ frameBorder = "0"
105
+ src = { modalOptions . url }
106
+ style = { { width : '100%' , height : modalOptions . height } }
107
+ />
108
+ ) }
115
109
</ ModalDialog . Body >
116
110
</ ModalDialog >
117
-
118
- ) : (
119
- < Modal
120
- body = { modalContent }
121
- dialogClassName = "modal-lti"
122
- onClose = { handleModalClose }
123
- open
124
- />
125
- )
126
111
) }
127
112
</ >
128
113
) ;
0 commit comments