import React, { Component } from 'react'; import FlatButton from 'material-ui/FlatButton'; import Dialog from './draggable-dialog'; import './draggable-dialog/css/index.css'; const defaultDialogHeight = 100; //px const dialogHeightPerLine = 25; //px export class ValidationErrorsInfoDialog extends React.Component { state = { open: this.props.open, } componentWillReceiveProps(newProps){ this.setState({open: newProps.open}); } handleOpen = () => { this.setState({ open: true }); }; handleClose = () => { this.setState({ open: false }); this.props.onDismiss(); }; render() { return (
{this.props.errorMessages.map(errorMessage => { const oneValidationMessage = ({errorMessage.message}
); const oneValidationMessageWithTab = (
  • {errorMessage.message}
  • ); if (errorMessage.field_name === "password-tab") { return oneValidationMessageWithTab; } else { return oneValidationMessage; } })}
    ); } } module.exports = ValidationErrorsInfoDialog;