react-application-core
Version:
A react-based application core for the business applications.
49 lines • 2.19 kB
JavaScript
;
var __extends = (this && this.__extends) || (function () {
var extendStatics = function (d, b) {
extendStatics = Object.setPrototypeOf ||
({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };
return extendStatics(d, b);
};
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 });
exports.Thumb = void 0;
var React = require("react");
var util_1 = require("../../util");
var definition_1 = require("../../definition");
var generic_component_1 = require("../base/generic.component");
var Thumb = /** @class */ (function (_super) {
__extends(Thumb, _super);
function Thumb() {
return _super !== null && _super.apply(this, arguments) || this;
}
/**
* @stable [05.06.2020]
* @returns {JSX.Element}
*/
Thumb.prototype.render = function () {
var className = this.mergedProps.className;
var _a = this.originalProps, disabled = _a.disabled, value = _a.value;
return (React.createElement("div", { ref: this.actualRef, className: util_1.ClsUtils.joinClassName(util_1.CalcUtils.calc(className), definition_1.ThumbClassesEnum.THUMB, disabled ? definition_1.ThumbClassesEnum.THUMB_DISABLED : definition_1.ThumbClassesEnum.THUMB_ENABLED, value ? definition_1.ThumbClassesEnum.THUMB_CHECKED : definition_1.ThumbClassesEnum.THUMB_UNCHECKED) }));
};
Object.defineProperty(Thumb.prototype, "componentsSettingsProps", {
/**
* @stable [05.06.2020]
* @returns {IChipProps}
*/
get: function () {
return this.componentsSettings.thumb;
},
enumerable: false,
configurable: true
});
return Thumb;
}(generic_component_1.GenericComponent));
exports.Thumb = Thumb;
//# sourceMappingURL=thumb.component.js.map