How to use the @material/icon-button.MDCIconButtonToggle.attachTo function in @material/icon-button

To help you get started, we’ve selected a few @material/icon-button 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 matsp / material-components-vue / components / icon-button / IconButton.vue View on Github external
update () {
      if ((this.isToggleButton || this.isToggleButtonViaSlots) && typeof this.mdcIconButtonToggle === 'undefined') {
        this.mdcIconButtonToggle = MDCIconButtonToggle.attachTo(this.$el)
        this.mdcIconButtonToggle.on = this.value
      }
      if (this.isIconButton && typeof this.mdcRipple === 'undefined') {
        this.mdcRipple = MDCRipple.attachTo(this.$el)
        this.mdcRipple.unbounded = true
      }
    }
  }