integrate draggable dialog package

This commit is contained in:
GotPPay
2018-05-23 04:48:57 +02:00
parent 1ed7d8bcec
commit fd1b7e06c1
4 changed files with 36 additions and 31 deletions

View File

@@ -1,7 +1,8 @@
import React, { Component } from 'react';
import Dialog from 'material-ui/Dialog';
import FlatButton from 'material-ui/FlatButton';
import Draggable, { DraggableCore } from 'react-draggable'; // Both at the same time
import Dialog from 'react-dialog'
import 'react-dialog/css/index.css';
export class ValidationErrorsInfoDialog extends React.Component {
@@ -23,7 +24,7 @@ export class ValidationErrorsInfoDialog extends React.Component {
};
render() {
const actions = [
<FlatButton
label="Dismiss"
@@ -34,24 +35,25 @@ export class ValidationErrorsInfoDialog extends React.Component {
];
return (
<div>
<Dialog
title="Erors"
actions={actions}
modal={this.props.modal ? this.props.modal : false}
open={this.state.open}
onRequestClose={this.handleClose}
overlayStyle={{backgroundColor: 'transparent'}}
>
{this.props.errorMessages.map(errorMessage => {
return (
<div>
<a>{errorMessage.message}</a>
<br/>
</div>
);
})}
</Dialog>
<div className="container">
{
this.state.open &&
<Dialog
title={this.props.title ? this.props.title : 'Error'}
isDraggable={this.props.draggable ? this.props.draggable : false}
buttons={actions}
hasCloseIcon={false}
>
{this.props.errorMessages.map(errorMessage => {
return (
<div>
<a>{errorMessage.message}</a>
<br/>
</div>
);})
}
</Dialog>
}
</div>
);
}