How to use the @material/dialog.MDCDialog.attachTo function in @material/dialog

To help you get started, we’ve selected a few @material/dialog 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 / dialog / Dialog.vue View on Github external
mounted () {
    this.mdcDialog = MDCDialog.attachTo(this.$el)
    this.mdcDialog.autoStackButtons = this.stacked
    this.mdcDialog.escapeKeyAction = this.escapeKeyAction
    this.mdcDialog.scrimClickAction = this.scrimClickAction

    this.slotObserver = new MutationObserver(() => this.updateSlots())
    this.slotObserver.observe(this.$el, {
      childList: true,
      subtree: true
    })
    this.updateSlots()
  },
  beforeDestroy () {