webpackHotUpdate(0,{

/***/ 209:
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
eval("/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_react__ = __webpack_require__(5);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_react___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0_react__);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__input_css__ = __webpack_require__(210);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__input_css___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_1__input_css__);\n\n\n\n\nclass Input extends __WEBPACK_IMPORTED_MODULE_0_react___default.a.Component {\n\n  constructor(props) {\n    super(props);\n    this.state = { value: '' };\n  }\n\n  onChange(value) {\n    this.setState({ value });\n  }\n\n  onKeyPress(e) {\n    if (e.charCode === 13 || e.keyCode === 13) {\n      // 'enter' key\n      this.onSend();\n    }\n  }\n\n  onSend() {\n    this.props.instance[`in_${this.props.port.name}`](this.state.value);\n    this.setState({ value: '' });\n  }\n\n  render() {\n    const key = `input-${this.props.port.name}`;\n\n    return __WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement(\n      'div',\n      { className: 'input' },\n      __WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement(\n        'label',\n        { htmlFor: key },\n        this.props.port.name,\n        ':'\n      ),\n      __WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement(\n        'div',\n        { className: 'group' },\n        __WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement('input', {\n          type: 'text',\n          name: key,\n          value: this.state.value,\n          onChange: e => this.onChange(e.target.value),\n          onKeyPress: e => this.onKeyPress(e) }),\n        __WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement(\n          'button',\n          { onClick: () => this.onSend() },\n          'Send'\n        )\n      )\n    );\n  }\n}\n/* harmony export (immutable) */ __webpack_exports__[\"a\"] = Input;\n//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2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