Sha256: 46a6e3ea399f5dc92142762857e034f9b0eb36d9747d9e17b3a77adcbad28ae1

Contents?: true

Size: 775 Bytes

Versions: 8

Compression:

Stored size: 775 Bytes

Contents

(function() {
  Rev.pullInto(this)('Input');

  Rev.registerComponent('Switch', {
    getId: function() {
      if (this.props.id != null) {
        return this.props.id;
      } else {
        return this._id || (this._id = "RevSwitch-" + (_.uniqueId()));
      }
    },
    render: function() {
      var className, props;
      props = this.getPropsWithout('className');
      className = this.classAdd({
        'RevSwitch': true,
        'switch': true
      });
      return React.createElement("div", {
        "className": className
      }, React.createElement("input", React.__spread({}, props, {
        "id": this.getId(),
        "type": "checkbox"
      })), React.createElement("label", {
        "htmlFor": this.getId()
      }));
    }
  });

}).call(this);

Version data entries

8 entries across 8 versions & 1 rubygems

Version Path
revelry_core-0.1.12.4 spec/dummy/tmp/jasmine/assets/revelry/ui/forms/Switch.self.js
revelry_core-0.1.12.2 spec/dummy/tmp/jasmine/assets/revelry/ui/forms/Switch.self.js
revelry_core-0.1.11.6 spec/dummy/tmp/jasmine/assets/revelry/ui/forms/Switch.self.js
revelry_core-0.1.10.1 spec/dummy/tmp/jasmine/assets/revelry/ui/forms/Switch.self.js
revelry_core-0.1.10.0 spec/dummy/tmp/jasmine/assets/revelry/ui/forms/Switch.self.js
revelry_core-0.1.9.1 spec/dummy/tmp/jasmine/assets/revelry/ui/forms/Switch.self.js
revelry_core-0.1.9.0 spec/dummy/tmp/jasmine/assets/revelry/ui/forms/Switch.self.js
revelry_core-0.1.8.0 spec/dummy/tmp/jasmine/assets/revelry/ui/forms/Switch.self.js