Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
ElliotFer2000 opened this issue Jun 28, 2020 · 0 comments

Comments

@ElliotFer2000
Copy link

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 ElliotFer2000 changed the title I can't initialize the drawer component, only types scripts fail there are when clone the repo I can't initialize the drawer component, only types scripts files there are when clone the repo Jun 28, 2020
@ElliotFer2000 ElliotFer2000 changed the title I can't initialize the drawer component, only types scripts files there are when clone the repo I can't initialize the drawer component, only typescripts files there are when clone the repo Jun 29, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

No branches or pull requests

1 participant