-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
refactor: refactor the structure of base container
Description: Refactor the structure of base component VAN-1840
- Loading branch information
1 parent
3953c76
commit 8bf2dda
Showing
7 changed files
with
63 additions
and
35 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,41 @@ | ||
import React from 'react'; | ||
|
||
import { ModalDialog } from '@openedx/paragon'; | ||
import PropTypes from 'prop-types'; | ||
import BaseContainer from '../base-container'; | ||
import PrivacyPolicy from './PrivacyPolicyFooter'; | ||
import './index.scss'; | ||
|
||
const AuthnComponent = ({ | ||
children, open, onClose, isPrivacyPolicy, | ||
}) => ( | ||
<ModalDialog | ||
isOpen={open} | ||
onClose={onClose} | ||
size="fullscreen" | ||
variant="default" | ||
hasCloseButton | ||
> | ||
<ModalDialog.Body className="modal-body-container overflow-hidden"> | ||
<BaseContainer> | ||
{children} | ||
</BaseContainer> | ||
</ModalDialog.Body> | ||
<ModalDialog.Footer className="modal-footer-content"> | ||
{isPrivacyPolicy && (<PrivacyPolicy />)} | ||
</ModalDialog.Footer> | ||
</ModalDialog> | ||
); | ||
|
||
AuthnComponent.defaultProps = { | ||
isPrivacyPolicy: false, | ||
}; | ||
|
||
AuthnComponent.propTypes = { | ||
children: PropTypes.node.isRequired, | ||
open: PropTypes.bool.isRequired, | ||
onClose: PropTypes.func.isRequired, | ||
isPrivacyPolicy: PropTypes.bool, | ||
}; | ||
|
||
export default AuthnComponent; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
.modal-body-container .pgn__modal-body-content { | ||
height: 100%; | ||
} | ||
|
||
.pgn__modal-close-container { | ||
background: white; | ||
border-radius: 50%; | ||
} | ||
|
||
.modal-footer-content { | ||
padding: 0 !important; | ||
} | ||
|
||
.privacy-policy-content { | ||
margin-bottom: 0px; | ||
} |
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,22 +1,6 @@ | ||
.modal-body-container .pgn__modal-body-content { | ||
height: 100%; | ||
} | ||
|
||
.modal-body-container .modal-body-content-layout { | ||
.modal-body-content-layout { | ||
display: flex; | ||
width: 100%; | ||
height: 100%; | ||
} | ||
|
||
.pgn__modal-close-container { | ||
background: white; | ||
border-radius: 50%; | ||
} | ||
|
||
.modal-footer-content { | ||
padding: 0 !important; | ||
} | ||
|
||
.privacy-policy-content { | ||
margin-bottom: 0px; | ||
} |