drawer icon indicating copy to clipboard operation
drawer copied to clipboard

I can't initialize the drawer component, only typescripts files there are when clone the repo

Open ElliotFer2000 opened this issue 5 years ago • 0 comments

I can't see what file I should import, I only see typescripts files.

I tried to use the url but in that way I get an error.

Script tag

<script type="module" href="https://unpkg.com/hy-drawer/dist/webcomponent/module.js"></script>

JavaScript code

const Drawer = hyDrawer.Drawer;

window.drawer = new Drawer(fixedSidebar, {
 mouseEvents: true
});

sidenavTrigger.addEventListener('click', function (e) {
  e.preventDefault();
  window.drawer.toggle();
});

JavaScript error

uncaught ReferenceError: hyDrawer is not defined

What should I do to make work the component?

ElliotFer2000 avatar Jun 28 '20 17:06 ElliotFer2000