import React from 'react'; import PropTypes from 'prop-types'; import { Input, Button, Modal, NgIf } from './'; import './prompt.scss'; export class Prompt extends React.Component { constructor(props){ super(props); this.state = { modal_appear: false, error: '' }; } componentWillReceiveProps(props){ if(props.error !== this.state.error){ this.setState({error: props.error}); } } onCancel(should_clear){ this.setState({modal_appear: false}); } onSubmit(e){ } render() { return (

{this.props.message}

{this.props.error} 
); } } Prompt.propTypes = { type: PropTypes.string, message: PropTypes.string.isRequired, onCancel: PropTypes.func, onConfirm: PropTypes.func };