Add option to view event source (#320)

* Add view source

* Add view source cons

* Change design

* Use PopupWindow instead of Dialog

* Undo changes to Dialog.jsx
This commit is contained in:
ginnyTheCat 2022-02-22 14:31:04 +01:00 committed by GitHub
parent a8a168b0a7
commit 1d7fbc841e
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
8 changed files with 119 additions and 2 deletions

View file

@ -51,7 +51,7 @@ PWContentSelector.propTypes = {
function PopupWindow({
className, isOpen, title, contentTitle,
drawer, drawerOptions, contentOptions,
onRequestClose, children,
onAfterClose, onRequestClose, children,
}) {
const haveDrawer = drawer !== null;
const cTitle = contentTitle !== null ? contentTitle : title;
@ -60,6 +60,7 @@ function PopupWindow({
<RawModal
className={`${className === null ? '' : `${className} `}pw-model`}
isOpen={isOpen}
onAfterClose={onAfterClose}
onRequestClose={onRequestClose}
size={haveDrawer ? 'large' : 'medium'}
>
@ -116,6 +117,7 @@ PopupWindow.defaultProps = {
contentTitle: null,
drawerOptions: null,
contentOptions: null,
onAfterClose: null,
onRequestClose: null,
};
@ -127,6 +129,7 @@ PopupWindow.propTypes = {
drawer: PropTypes.node,
drawerOptions: PropTypes.node,
contentOptions: PropTypes.node,
onAfterClose: PropTypes.func,
onRequestClose: PropTypes.func,
children: PropTypes.node.isRequired,
};