How to use the @material/snackbar.MDCSnackbar.attachTo function in @material/snackbar

To help you get started, we’ve selected a few @material/snackbar 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 mya-ake / vuejs-pwa-and-ssr-on-lambda / src / pages / memo.vue View on Github external
mounted() {
    const id = this.$route.params.id;
    const memo = isNaN(id) === true ? Memo.createNew() : this.$store.getters['memo/getMemo'](id);
    this.memo = memo;

    this.snackbar = MDCSnackbar.attachTo(document.querySelector('.mdc-snackbar'));
    MDCRipple.attachTo(document.querySelector('.mdc-button'));
  },
  destroyed() {
github matsp / material-components-vue / components / snackbar / Snackbar.vue View on Github external
mounted () {
    this.mdcSnackbar = MDCSnackbar.attachTo(this.$el)
    this.mdcSnackbar.timeoutMs = this.timeoutMs
    this.mdcSnackbar.closeOnEscape = this.closeOnEscape
    if (this.labelText && this.labelText !== '') this.mdcSnackbar.labelText = this.labelText
    if (this.actionButtonText && this.actionButtonText !== '') this.mdcSnackbar.actionButtonText = this.actionButtonText
  },
  beforeDestroy () {