import React, {Component, PropTypes} from 'react'; import {Modal, ModalHeader, ModalBody, ModalFooter} from './Modal' class PromptModal extends Component { _onSubmit (e) { e.preventDefault(); this.props.onSubmit(this.refs.input.value); this.refs.modal.close(); } render () { const {visible, onClose, submitName, headerName} = this.props; return ( {headerName}
) } } PromptModal.propTypes = { onSubmit: PropTypes.func.isRequired, visible: PropTypes.bool.isRequired, headerName: PropTypes.string.isRequired, submitName: PropTypes.string, onClose: PropTypes.func }; export default PromptModal;