Open atomkirk opened 2 years ago
I guess I could just fork the repo and rename all the props to be all lowercase then build it myself? 🤔
maybe a strategy like this could also be used https://github.com/oranmor/svelte-custom-element-dash-properties-example
specifically:
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.
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 https://github.com/sveltejs/svelte/issues/3520 is resolved, custom elements are not supported and we intend to remove the docs page in the next release.
Ahhhhh. Thank you that answer!!
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?