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

kebab case for custom elements #355

Open
atomkirk opened this issue Aug 23, 2022 · 5 comments
Open

kebab case for custom elements #355

atomkirk opened this issue Aug 23, 2022 · 5 comments

Comments

@atomkirk
Copy link

atomkirk commented Aug 23, 2022

What do you think about using something like https://github.com/roonie007/vite-plugin-svelte-kebab-props to convert camelcase attributes to kebab case so that all props can be set easily when using as custom elements?

If you think this might be possible, would you mind giving me some hints as to how I can contribute to this lib to make that happen?

@atomkirk
Copy link
Author

I guess I could just fork the repo and rename all the props to be all lowercase then build it myself? 🤔

@atomkirk
Copy link
Author

For context, I want to use this component lib with Phoenix Liveview. I think making this lib very consumable as custom elements greatly increases the market for it since it can be used by any front-end framework.

@aabounegm
Copy link
Collaborator

That indeed seems like a nice solution for the prop naming issue, but unfortunately there is a bigger problem at hand. Currently, Svelte does not correctly output a custom element for nested components. Unfortunately, we do a lot of component reuse in the library and it's not very feasible to migrate all the usages to custom elements, so until sveltejs/svelte#3520 is resolved, custom elements are not supported and we intend to remove the docs page in the next release.

@atomkirk
Copy link
Author

Ahhhhh. Thank you that answer!!

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

No branches or pull requests

2 participants