How to use the @material/toolbar/foundation function in @material/toolbar

To help you get started, we’ve selected a few @material/toolbar 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 pgbross / vue-material-adapter / packages / mcwv-toolbar / mdc-toolbar.vue View on Github external
mounted() {
    this.foundation = new MDCToolbarFoundation({
      addClass: className => {
        this.$set(this.rootClasses, className, true);
      },
      removeClass: className => {
        this.$delete(this.rootClasses, className);
      },
      hasClass: className => {
        return this.$refs.root.classList.contains(className);
      },
      registerScrollHandler: handler => {
        window.addEventListener('scroll', handler);
      },
      deregisterScrollHandler: handler => {
        window.removeEventListener('scroll', handler);
      },
      registerResizeHandler: handler => {