Skip to content

Commit

Permalink
chore: removed not found components
Browse files Browse the repository at this point in the history
  • Loading branch information
Asespinel committed Jan 6, 2025
1 parent a0f1344 commit e8b0eae
Show file tree
Hide file tree
Showing 2 changed files with 23 additions and 40 deletions.
59 changes: 21 additions & 38 deletions src/courseware/course/sequence/Unit/ContentIFrame.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import React from 'react';

import { ErrorPage } from '@edx/frontend-platform/react';
import { StrictDict } from '@edx/react-unit-test-utils';
import { ModalDialog, Modal } from '@openedx/paragon';
import { ModalDialog } from '@openedx/paragon';
import { PluginSlot } from '@openedx/frontend-plugin-framework';

import PageLoading from '@src/generic/PageLoading';
Expand Down Expand Up @@ -66,21 +66,6 @@ const ContentIFrame = ({
onLoad: handleIFrameLoad,
};

let modalContent;
if (modalOptions.isOpen) {
modalContent = modalOptions.body
? <div className="unit-modal">{ modalOptions.body }</div>
: (
<iframe
title={modalOptions.title}
allow={IFRAME_FEATURE_POLICY}
frameBorder="0"
src={modalOptions.url}
style={{ width: '100%', height: modalOptions.height }}
/>
);
}

return (
<>
{(shouldShowContent && !hasLoaded) && (
Expand All @@ -101,28 +86,26 @@ const ContentIFrame = ({
<iframe title={title} {...contentIFrameProps} data-testid={testIDs.contentIFrame} />
</div>
)}
{modalOptions.isOpen && (modalOptions.isFullscreen
? (
<ModalDialog
dialogClassName="modal-lti"
onClose={handleModalClose}
size="fullscreen"
isOpen
hasCloseButton={false}
>
<ModalDialog.Body className={modalOptions.modalBodyClassName}>
{modalContent}
</ModalDialog.Body>
</ModalDialog>

) : (
<Modal
body={modalContent}
dialogClassName="modal-lti"
onClose={handleModalClose}
open
/>
)
{modalOptions.isOpen && (
<ModalDialog
dialogClassName="modal-lti"
onClose={handleModalClose}
isOpen
>
<ModalDialog.Body>
{modalOptions.body
? <div className="unit-modal">{ modalOptions.body }</div>
: (
<iframe
title={modalOptions.title}
allow={IFRAME_FEATURE_POLICY}
frameBorder="0"
src={modalOptions.url}
style={{ width: '100%', height: modalOptions.height }}
/>
)}
</ModalDialog.Body>
</ModalDialog>
)}
</>
);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import React, {
} from 'react';
import PropTypes from 'prop-types';
import { injectIntl, intlShape } from '@edx/frontend-platform/i18n';
import { Input } from '@openedx/paragon';
import { Form } from '@openedx/paragon';

import messages from './messages';

Expand Down Expand Up @@ -46,7 +46,7 @@ class MasqueradeUserNameInput extends Component {
...rest
} = this.props;
return (
<Input
<Form.Control
aria-labelledby="masquerade-search-label"
label={intl.formatMessage(messages.userNameLabel)}
onKeyPress={(event) => this.onKeyPress(event)}
Expand Down

0 comments on commit e8b0eae

Please sign in to comment.