import React from 'react'; import {observer, inject} from 'mobx-react'; import {Dialog, FlatButton, TextField} from "material-ui"; import {DIALOG} from "../../../../stores/global_ui"; @inject('appstate') @observer export default class MerchantInputShippingCodeDialog extends React.Component { constructor(props) { super(props); this.state = { value: '' }; this.props = props; } componentWillReceiveProps() { } render() { const actions = [ { this.props.appstate.globalUI.hideDialog(DIALOG.ORDER.INPUT_SHIPPING_CODE); this.setState({ value: '' }); }} />, { this.props.appstate.order.inputShippingCode(this.state.value); this.props.appstate.globalUI.hideDialog(DIALOG.ORDER.INPUT_SHIPPING_CODE); this.setState({ value: '' }); }} />, ]; return ( { this.props.appstate.globalUI.hideDialog(DIALOG.ORDER.INPUT_SHIPPING_CODE); this.setState({ value: '' }); }} > this.setState({value: event.target.value})} /> ); } }