kea-react
Version:
Componentes comunes de react
34 lines (33 loc) • 1.62 kB
JavaScript
;
var __extends = (this && this.__extends) || (function () {
var extendStatics = Object.setPrototypeOf ||
({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };
return function (d, b) {
extendStatics(d, b);
function __() { this.constructor = d; }
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
};
})();
Object.defineProperty(exports, "__esModule", { value: true });
var React = require("react");
var botones_1 = require("../botones");
var JsonNodeComponent = /** @class */ (function (_super) {
__extends(JsonNodeComponent, _super);
function JsonNodeComponent() {
return _super !== null && _super.apply(this, arguments) || this;
}
JsonNodeComponent.prototype.render = function () {
var x = this.props.value;
var key = this.props.propname;
return (React.createElement("span", null,
(key != null && key != "") &&
React.createElement("span", { style: { fontWeight: "bold", color: "#231858" } },
React.createElement(botones_1.Link, { style: "info", onClick: this.props.onClick }, key),
": "),
x.value != null &&
React.createElement("span", { style: { color: "#9B344E" } }, x.type == "string" ? ("\"" + x.value + "\"") : ("" + x.value))));
};
return JsonNodeComponent;
}(React.PureComponent));
exports.JsonNodeComponent = JsonNodeComponent;