integrate draggable dialog package
This commit is contained in:
@@ -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>
|
||||
);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user