weightless icon indicating copy to clipboard operation
weightless copied to clipboard

queue-snackbar missing on npm

Open caliny97 opened this issue 5 years ago • 6 comments

queue-snackbar missing when installing weightless from npm.

caliny97 avatar Jun 11 '19 19:06 caliny97

queue-snackbar is not a WC but a method :

import { queueSnackbar } from "weightless/snackbar";

queueSnackbar({
          container: document.body,
          fixed: true,
          template: html`
            What you want
          `
        });

eskan avatar Jun 12 '19 13:06 eskan

correct is a method, but is not there. It seems to be structured as "showSnackbar" which has its corresponding implementation in a single file.

This is from the snackbar demo page.

image

This is from the index.d

image

caliny97 avatar Jun 12 '19 14:06 caliny97

Hi, right queue-snackbar is not exported by index.d.ts so you have to import it as import { queueSnackbar } from "weightless/snackbar/queue-snackbar"; i guess the maintener choose to not export it by default. Not an issue.

eskan avatar Jun 12 '19 18:06 eskan

That is the issue, queue-snackbar.js is missing from the NPM install. This is the tree from the npm intallation

image

caliny97 avatar Jun 12 '19 18:06 caliny97

Sorry i misunderstood :/

eskan avatar Jun 12 '19 19:06 eskan

https://github.com/andreasbm/weightless/pull/72

eskan avatar Jun 12 '19 19:06 eskan