jahilldev / component-elements

Create a custom element from any component with these tiny functions (2KB GZipped, ~1KB Brotli). Preact and React currently supported
MIT License
89 stars 7 forks source link

Normalise slot keys for component props #17

Closed jahilldev closed 2 years ago

jahilldev commented 2 years ago

Currently we're normalising custom element attribute keys from kebab-case to camelCase for overall ease of use and consistency with common code conventions. We aren't, however, doing the same for slot attribute values.

This PR addresses this, and allows a consumer to provide whichever common casing convention they'd like to a slot key value, and expect that casing to be normalised to camelCase.