fix: handle boolean true in nativeStyleMapping#323
Conversation
|
Thanks for picking this up! One small thing that might be worth an extra test: |
When nativeStyleMapping uses `true` (e.g. `textAlign: true`), the value
should be treated as the key name itself. Previously, `true.split(".")`
would throw a TypeError at runtime, breaking TextInput and
ImageBackground components that use this pattern.
Converts boolean `true` values to the key name during config creation
in useNativeCss so the runtime always receives strings.
Fixes #232
6b4c0c8 to
72c2f6a
Compare
|
Hi, what is the state of this PR? I just ran into that issue |
|
Specifically, it breaks, when I try to use And |
Summary
nativeStyleMappingallowstrueas a value (e.g.textAlign: trueon TextInput,backgroundColor: trueon ImageBackground), meaning "extract this property from style and set it as a prop with the same name"path.split(".")which throwsTypeErroron booleantruetrueto the key name during config creation inuseNativeCss, so the runtime always receives stringsTest plan
styled()componentsFixes #232
Supersedes #251