Abstracted out <LoadingModal/>

This commit is contained in:
orangemug
2018-06-18 19:06:16 +01:00
parent 558f3d649d
commit afbdaecd0a
3 changed files with 63 additions and 15 deletions

View File

@@ -11,6 +11,12 @@ class Modal extends React.Component {
title: PropTypes.string.isRequired,
onOpenToggle: PropTypes.func.isRequired,
children: PropTypes.node,
underlayClickExits: PropTypes.bool,
underlayProps: PropTypes.object,
}
static defaultProps = {
underlayClickExits: true
}
getApplicationNode() {
@@ -21,6 +27,8 @@ class Modal extends React.Component {
if(this.props.isOpen) {
return <AriaModal
titleText={this.props.title}
underlayClickExits={this.props.underlayClickExits}
underlayProps={this.props.underlayProps}
getApplicationNode={this.getApplicationNode}
data-wd-key={this.props["data-wd-key"]}
verticallyCenter={true}