|
| 1 | +"use strict"; |
| 2 | +var __extends = (this && this.__extends) || function (d, b) { |
| 3 | + for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; |
| 4 | + function __() { this.constructor = d; } |
| 5 | + d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); |
| 6 | +}; |
| 7 | +var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) { |
| 8 | + var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d; |
| 9 | + if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc); |
| 10 | + else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r; |
| 11 | + return c > 3 && r && Object.defineProperty(target, key, r), r; |
| 12 | +}; |
| 13 | +var __metadata = (this && this.__metadata) || function (k, v) { |
| 14 | + if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v); |
| 15 | +}; |
| 16 | +var React = require('react'); |
| 17 | +var react_redux_1 = require('react-redux'); |
| 18 | +var actions_1 = require('../../actions'); |
| 19 | +var IconButton_1 = require('material-ui/IconButton'); |
| 20 | +var close_1 = require('material-ui/svg-icons/navigation/close'); |
| 21 | +var CloseWindow = (function (_super) { |
| 22 | + __extends(CloseWindow, _super); |
| 23 | + function CloseWindow() { |
| 24 | + _super.apply(this, arguments); |
| 25 | + } |
| 26 | + CloseWindow.prototype.render = function () { |
| 27 | + return (React.createElement(IconButton_1.default, {onClick: this.props.windowToggle}, React.createElement(close_1.default, null))); |
| 28 | + }; |
| 29 | + CloseWindow = __decorate([ |
| 30 | + react_redux_1.connect(null, function (dispatch) { |
| 31 | + return { |
| 32 | + windowToggle: function () { return dispatch(actions_1.windowToggle()); } |
| 33 | + }; |
| 34 | + }), |
| 35 | + __metadata('design:paramtypes', []) |
| 36 | + ], CloseWindow); |
| 37 | + return CloseWindow; |
| 38 | +}(React.Component)); |
| 39 | +exports.CloseWindow = CloseWindow; |
0 commit comments