Sha256: e09f63c9d0c4f2f644bc8b9ece297e2783b5b2254ca8e412b84f96b9149cbdb2

Contents?: true

Size: 582 Bytes

Versions: 2

Compression:

Stored size: 582 Bytes

Contents

import {MDCTopAppBar} from '@material/top-app-bar';
import {MDCDrawer} from '@material/drawer';

const drawer = MDCDrawer.attachTo(document.querySelector('.mdc-drawer'));
const topAppBar = MDCTopAppBar.attachTo(document.getElementById('app-bar'));

topAppBar.setScrollTarget(document.querySelector('.main-content'));
topAppBar.listen('MDCTopAppBar:nav', () => {
  drawer.open = !drawer.open;
});

function windowSizeChange() {
  if (window.innerWidth <= 1250) {
    drawer.open = false;
  } else {
    drawer.open = true;
  }
}

window.addEventListener('resize', windowSizeChange);

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
simplecov-material-1.0.0 dist/scripts/topbar.js
simplecov-material-0.5.0 dist/scripts/topbar.js