Skip to content
Snippets Groups Projects
Commit 7153782c authored by Bobak Oftadeh's avatar Bobak Oftadeh
Browse files

Fix closing about modal

parent 6c561b10
No related branches found
No related tags found
No related merge requests found
......@@ -24,6 +24,15 @@ const defaultProps = {
};
class ModalSimple extends Component {
constructor(props) {
super(props);
this.handleDismiss = this.handleDismiss.bind(this);
}
handleDismiss() {
this.props.modalHide(this.props.dismiss.callback);
}
render() {
const {
title,
......@@ -35,11 +44,13 @@ class ModalSimple extends Component {
...otherProps
} = this.props;
const closeModel = (onRequestClose || this.handleDismiss);
return (
<ModalBase
isOpen={modalisOpen}
className={cx(className, styles.modal)}
onRequestClose={onRequestClose}
onRequestClose={closeModel}
contentLabel={title}
{...otherProps}
>
......@@ -51,7 +62,7 @@ class ModalSimple extends Component {
icon="close"
circle
hideLabel
onClick={onRequestClose}
onClick={closeModel}
aria-describedby="modalDismissDescription"
/>
</header>
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment