preactjs / preact-custom-element

Wrap your component up as a custom element
MIT License
360 stars 52 forks source link

Hyphenate camelCased Preact props #16

Closed tyom closed 4 years ago

tyom commented 5 years ago

As HTML attributes are not case sensitive and setAttribute converts camel case attributes to lower case we should use hyphens instead for compound words. However Preact/React convention is to use camel case for props.

This converts hyphenated WC attributes to camel cased prop names.

marvinhagemeister commented 4 years ago

The changes were merged in #30 :tada: