1
0
mirror of https://github.com/oceanprotocol/commons.git synced 2023-03-15 18:03:00 +01:00

Merge pull request #177 from oceanprotocol/fix/modal-fixes

Modal fixes
This commit is contained in:
Matthias Kretschmann 2019-07-09 23:17:39 +02:00 committed by GitHub
commit d545bcaa30
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 16 additions and 0 deletions

View File

@ -1,5 +1,10 @@
@import '../../styles/variables'; @import '../../styles/variables';
// prevent background scrolling
:global(.ReactModal__Body--open) {
overflow: hidden;
}
.modalOverlay { .modalOverlay {
position: fixed; position: fixed;
top: 0; top: 0;

View File

@ -44,6 +44,17 @@ export default class Report extends PureComponent<
private toggleModal = () => { private toggleModal = () => {
this.setState({ isModalOpen: !this.state.isModalOpen }) this.setState({ isModalOpen: !this.state.isModalOpen })
this.state.isModalOpen && this.reset()
}
private reset() {
this.setState({
comment: '',
message: 'Sending...',
isSending: false,
hasError: false,
hasSuccess: false
})
} }
private sendEmail = async (event: Event) => { private sendEmail = async (event: Event) => {