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

{this.props.message}

); } } Alert.propTypes = { message: PropTypes.string.isRequired, onConfirm: PropTypes.func };