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鈥檒l occasionally send you account related emails.

Already on GitHub? Sign in to your account

Get access to the class without registering the custom element #1

Closed
daKmoR opened this issue Sep 1, 2020 · 2 comments 路 Fixed by #2
Closed

Get access to the class without registering the custom element #1

daKmoR opened this issue Sep 1, 2020 · 2 comments 路 Fixed by #2
Assignees

Comments

@daKmoR
Copy link
Contributor

daKmoR commented Sep 1, 2020

hey there 馃憢

that looks very nice 馃憤

any chance we can get an import that does not register the custom element? e.g. if you wanna use it with a scoped registry... or you need to allow 2 versions of the component to be loaded.

strawman proposal

import { ColorPickerHex } from 'vanilla-colorful/ColorPickerHex.js';

PS: could be archived by providing an export map 馃憤

@web-padawan
Copy link
Owner

Hi, thanks for the issue. Sounds like a good idea 馃憤

I think the structure could look as follows:

  • lib/entrypoints/hex.js - class that does not register the custom element
  • color-picker-hex.js - custom element definition.

@web-padawan
Copy link
Owner

Released 0.1.1 version with this feature, see the example.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants