src/ui/components/component.js
function toggleClass(...args) {
    const cssClass = args[0];
    const enable = (args.length === 2) ? args[1] : !this.classList.contains(cssClass);
    this.classList[enable ? 'add' : 'remove'](cssClass);
  }
function toggleClass(...args) {
    const cssClass = args[0];
    const enable = (args.length === 2) ? args[1] : !this.classList.contains(cssClass);
    this.classList[enable ? 'add' : 'remove'](cssClass);
  }
function toggleClass ( ... args ) { const cssClass = args [ 0 ] ; const enable = ( args . length === 2 ) ? args [ 1 ] : ! this . classList . contains ( cssClass ) ; this . classList [ enable ? 'add' : 'remove' ] ( cssClass ) ; }
Toggle a CSS Class.

Why do we have this? Well, sadly as long as we support IE11 which has an incorrect implementation
of node.classList.toggle, we will have to do this ourselves.

@method toggleClass
@param {String} className
@param {Boolean} [enable=!enable]
Toggle a CSS Class .