diff options
Diffstat (limited to 'graphgraph-fe/src/ValidationModal.js')
-rw-r--r-- | graphgraph-fe/src/ValidationModal.js | 49 |
1 files changed, 0 insertions, 49 deletions
diff --git a/graphgraph-fe/src/ValidationModal.js b/graphgraph-fe/src/ValidationModal.js deleted file mode 100644 index 8bf1989..0000000 --- a/graphgraph-fe/src/ValidationModal.js +++ /dev/null @@ -1,49 +0,0 @@ -import _ from 'underscore' -import React from 'react' -import './ValidationModal.css' -import { Button, Modal, ListGroup, ListGroupItem } from 'react-bootstrap' - - -class ValidationModal extends React.Component { - constructor(...args) { - super(...args); - this.state = { showModal: false }; - - this.close = () => { - this.setState({ showModal: false }); - }; - - this.open = () => { - this.setState({ showModal: true }); - }; - } - - renderBackdrop(props) { - return <div {...props} className="modal-backdrop" />; - } - - render() { - var problems = this.props.schemaProblems - var items = _.map(problems, (problem, i) => <ListGroupItem key={i}> {problem} </ListGroupItem>) - return ( - <div> - <Button onClick={this.open}>Validate schema</Button> - <Modal - onHide={this.close} - className="modal-validator" - aria-labelledby="modal-label" - show={this.state.showModal} - renderBackdrop={this.renderBackdrop} - > - <div className="modal-list"> - <ListGroup> - {items} - </ListGroup> - </div> - </Modal> - </div> - ); - } -} - -export default ValidationModal |