Why Gemfury? Push, build, and install  RubyGems npm packages Python packages Maven artifacts PHP packages Go Modules Debian packages RPM packages NuGet packages

Repository URL to install this package:

Details    
@skava/ui / dist / forms / input / plugins / Simple / LabelInput.js
Size: Mime:
"use strict";

Object.defineProperty(exports, "__esModule", {
  value: true
});

const tslib_1 = require("tslib");

const react_1 = tslib_1.__importDefault(require("react"));

const index_1 = require("../../../../components/molecules/LabelWithAction");

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 wrapperClass = props.wrapperClass || '';
    const attributes = Object.assign({}, props, {
      text: computedText,
      onClick,
      classes,
      icon,
      wrapperClass
    });
    return react_1.default.createElement(index_1.LabelWithAction, Object.assign({}, attributes, {
      key: computedText
    }));
  }

}

exports.LabelInput = LabelInput;
exports.default = LabelInput; //# sourceMappingURL=LabelInput.js.map