Repository URL to install this package:
|
Version:
0.9.6 ▾
|
"use strict";
var __importDefault = (this && this.__importDefault) || function (mod) {
return (mod && mod.__esModule) ? mod : { "default": mod };
};
Object.defineProperty(exports, "__esModule", { value: true });
const react_1 = __importDefault(require("react"));
const index_1 = require("molecules/LabelWithAction/index");
const InputChain_1 = require("../../InputChain");
class LabelInput extends InputChain_1.InputChain {
static isSatisfiedByProps(props) {
return props.type === 'label';
}
render() {
const props = this.get('props');
const state = this.get('state');
console.log('LabelInput', props);
const { onClick, classes, icon, labelText, text, value, label } = props;
const computedText = labelText || text || value || label;
const attributes = Object.assign({}, props, { text: computedText, onClick,
classes,
icon });
return react_1.default.createElement(index_1.LabelWithAction, Object.assign({}, attributes, { key: computedText }));
}
}
exports.LabelInput = LabelInput;
exports.default = LabelInput;
//# sourceMappingURL=LabelInput.js.map