import React from 'react'; import PropTypes from 'prop-types'; import Textarea from 'react-textarea-autosize'; import {Modal} from './Modal'; import {ModalHeader} from './ModalHeader'; import {ModalBody} from './ModalBody'; import {ModalFooter} from './ModalFooter'; import {gettext} from 'core/utils'; export class ModalPrompt extends React.Component { static propTypes: any; static defaultProps: any; constructor(props) { super(props); this.updateValue = this.updateValue.bind(this); this.submitValue = this.submitValue.bind(this); this.state = { value: this.props.initialValue || '', }; } updateValue(event) { this.setState({ value: event.target.value, }); } submitValue() { this.props.onSubmit(this.state.value); } render() { return ( {this.props.title}