How to use component-classes - 9 common examples

To help you get started, we’ve selected a few component-classes examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github react-component / select / src / Select.jsx View on Github external
updateFocusClassName() {
    const { refs, props } = this;
    // avoid setState and its side effect
    if (this._focused) {
      classes(refs.root).add(`${props.prefixCls}-focused`);
    } else {
      classes(refs.root).remove(`${props.prefixCls}-focused`);
    }
  },
github iuap-design / bee.tinper.org / tinper-bee / bee-select / src / RcSelect.js View on Github external
updateFocusClassName = () => {
    const { rootRef, props } = this;
    // avoid setState and its side effect
    if (this._focused) {
      classes(rootRef).add(`${props.prefixCls}-focused`);
    } else {
      classes(rootRef).remove(`${props.prefixCls}-focused`);
    }
  };
github NSFI / ppfish-components / source / components / AutoComplete / src / Select.js View on Github external
updateFocusClassName = () => {
    const { rootRef, props } = this;
    // avoid setState and its side effect
    if (this._focused) {
      classes(rootRef).add(`${props.prefixCls}-focused`);
    } else {
      classes(rootRef).remove(`${props.prefixCls}-focused`);
    }
  };
github kazupon / vue-validator / test / specs / classes.js View on Github external
it('should be added', (done) => {
      let radio1 = el.getElementsByTagName('input')[0]
      let radio2 = el.getElementsByTagName('input')[1]
      let radio3 = el.getElementsByTagName('input')[2]
      let radio4 = el.getElementsByTagName('input')[3]
      let cls1 = classes(radio1)
      let cls2 = classes(radio2)
      let cls3 = classes(radio3)
      let cls4 = classes(radio4)
      let group1 = [cls1, cls2]
      let group2 = [cls3, cls4]

      each(group1, (cls, index) => {
        assert(cls.has('valid'))
        assert(!cls.has('invalid'))
        assert(!cls.has('touched'))
        assert(cls.has('untouched'))
        assert(cls.has('pristine'))
        assert(!cls.has('dirty'))
        assert(!cls.has('modified'))
      })
      each(group2, (cls, index) => {
github kazupon / vue-validator / test / specs / errors.js View on Github external
each(['0', '4'], (val) => {
          const cls = classes(el.getElementsByTagName('input')[parseInt(val)])
          assert(!cls.has('valid'))
          assert(cls.has('invalid'))
          assert(cls.has('touched'))
          assert(!cls.has('untouched'))
          assert(cls.has('dirty'))
          assert(cls.has('modified'))
        })
        done()
github godaner / vm-engine / vm-backend / src / main / resources / static / node_modules / rc-select / es / Select.js View on Github external
this.updateFocusClassName = function () {
    var refs = _this2.refs,
        props = _this2.props;
    
    if (_this2._focused) {
      classes(refs.root).add(props.prefixCls + '-focused');
    } else {
      classes(refs.root).remove(props.prefixCls + '-focused');
    }
  };
github godaner / vm-engine / vm-backend / src / main / resources / static / node_modules / rc-select / es / Select.js View on Github external
this.updateFocusClassName = function () {
    var refs = _this2.refs,
        props = _this2.props;
    
    if (_this2._focused) {
      classes(refs.root).add(props.prefixCls + '-focused');
    } else {
      classes(refs.root).remove(props.prefixCls + '-focused');
    }
  };

component-classes

Cross-browser element class list

MIT
Latest version published 9 years ago

Package Health Score

56 / 100
Full package analysis

Popular component-classes functions