How to use the @material/ripple.MDCRipple.attachTo function in @material/ripple

To help you get started, we’ve selected a few @material/ripple 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 san2beerelli / material-webcomponents / dist / collection / components / list / mwc-list-item.js View on Github external
componentDidLoad() {
        if (this.ripple) {
            this.listItemRipple = MDCRipple.attachTo(this.listItem);
            //  this.listItemRipple.unbounded = true
        }
    }
    componentDidUnload() {
github prateekbh / preact-material-components / MaterialComponent.js View on Github external
attachRipple() {
    if (this.props.ripple && this.control) {
      MDCRipple.attachTo(this.control);
    }
  }
  // Build the className based on component names and mdc props
github matsp / material-components-vue / components / button / Button.vue View on Github external
reInstantiateRipple () {
      if (this.ripple) {
        if (this.mdcRipple) {
          this.mdcRipple.destroy()
        }
        MDCRipple.attachTo(this.$el)
      } else {
        if (this.mdcRipple) {
          this.mdcRipple.destroy()
        }
        this.mdcRipple = undefined
      }
    }
  }
github springtype-org / springtype / src / packages / material-ui / src / componets / button / MWCButton.ts View on Github external
onFlow(initial: boolean) {

        if (initial && this.ripple) {
            MDCRipple.attachTo(this.button);
        }
    }
}
github Shyam-Chen / Svelte-Starter / src / shared / layout / layout.js View on Github external
(ripple) => {
      MDCRipple.attachTo(ripple);
      window.scrollTo(0, 0);
    },
  );
github matsp / material-components-vue / components / ripple / Ripple.vue View on Github external
this.$slots.default.map((n, i) => {
          if (i === 0) {
            n.elm.classList.add('mdc-ripple-surface')
            this.accent ? n.elm.classList.add('mdc-ripple-surface--accent') : n.elm.classList.add('mdc-ripple-surface--primary')
            this.mdcRipple = MDCRipple.attachTo(n.elm)
            this.mdcRipple.unbounded = this.unbounded
          }
        })
      }
github matsp / material-components-vue / components / list / ListItem.vue View on Github external
reInstantiateRipple () {
      if (this.ripple) {
        if (this.mdcRipple) {
          this.mdcRipple.destroy()
        }
        MDCRipple.attachTo(this.$el)
      } else {
        if (this.mdcRipple) {
          this.mdcRipple.destroy()
        }
        this.mdcRipple = undefined
      }
    }
  }
github dessant / clear-browsing-data / src / action / App.vue View on Github external
window.setTimeout(() => {
      for (const listEl of document.querySelectorAll(
        '.list-bulk-button, .list-items'
      )) {
        const list = new MDCList(listEl);
        for (const el of list.listElements) {
          MDCRipple.attachTo(el);
        }
      }
    }, 500);
  }
github matsp / material-components-vue / components / fab / Fab.vue View on Github external
reInstantiateRipple () {
      if (this.ripple) {
        if (this.mdcRipple) {
          this.mdcRipple.destroy()
        }
        MDCRipple.attachTo(this.$el)
      } else {
        if (this.mdcRipple) {
          this.mdcRipple.destroy()
        }
        this.mdcRipple = undefined
      }
    }
  }