Skip to content

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

@ElliotFer2000

Description

@ElliotFer2000

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?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions