How to use the @instructure/ui-dom-utils.getClassList function in @instructure/ui-dom-utils

To help you get started, we’ve selected a few @instructure/ui-dom-utils 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 instructure / instructure-ui / packages / ui-motion / src / Transition / BaseTransition.js View on Github external
transition = (toState, fromState, transitionCallback, transitionDuration = 0) => {
    if (this._unmounted) return

    const classList = getClassList(this)

    const transitionClassName = this.getTransitionClassName(toState)
    const prevTransitionClassName = this.getTransitionClassName(fromState)
    const baseTransitionClassName = this.props.transitionClassName

    if (fromState && transitionDuration && this.transitionEnabled(toState)) {
      classList.add(baseTransitionClassName)
    } else {
      classList.remove(baseTransitionClassName)
    }

    if (prevTransitionClassName) {
      classList.remove(prevTransitionClassName)
    }

    if (transitionClassName) {
github instructure / instructure-ui / packages / ui-motion / src / Transition / BaseTransition.js View on Github external
this.setState({ transitioning: false }, () => {
      if (this._unmounted) return

      const classList = getClassList(this)

      Object.keys(STATES).forEach((state) => {
        classList.remove(this.getTransitionClassName(state))
      })

      classList.remove(transitionClassName)
    })
  }