UNPKG

camelot-unchained

Version:
54 lines (39 loc) 3.26 kB
/** * This Source Code Form is subject to the terms of the Mozilla Public * License, v. 2.0. If a copy of the MPL was not distributed with this * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ "use strict"; var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }(); function _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return call && (typeof call === "object" || typeof call === "function") ? call : self; } function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; } function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } var React = require('react'); var DisplayName_1 = require('./components/DisplayName'); var Doll_1 = require('./components/Doll'); var Stats_1 = require('./components/Stats'); var Buffs_1 = require('./components/Buffs'); var WoundsProps = function WoundsProps() { _classCallCheck(this, WoundsProps); }; exports.WoundsProps = WoundsProps; var WoundsState = function WoundsState() { _classCallCheck(this, WoundsState); }; exports.WoundsState = WoundsState; var WoundFrame = function (_React$Component) { _inherits(WoundFrame, _React$Component); function WoundFrame(props) { _classCallCheck(this, WoundFrame); return _possibleConstructorReturn(this, Object.getPrototypeOf(WoundFrame).call(this, props)); } _createClass(WoundFrame, [{ key: 'render', value: function render() { return React.createElement("div", null, React.createElement(DisplayName_1.default, { name: this.props.name }), React.createElement(Doll_1.default, { injuries: this.props.injuries }), React.createElement(Buffs_1.default, { type: "boon" }), React.createElement(Buffs_1.default, { type: "bane" }), React.createElement(Stats_1.default, { blood: this.props.health, bloodMax: this.props.healthMax, stamina: this.props.stamina, staminaMax: this.props.staminaMax, panic: this.props.panic, panicMax: this.props.panicMax, temp: this.props.temp, tempMax: this.props.tempMax })); } }]); return WoundFrame; }(React.Component); Object.defineProperty(exports, "__esModule", { value: true }); exports.default = WoundFrame;