react-native-skeleton-placeholder icon indicating copy to clipboard operation
react-native-skeleton-placeholder copied to clipboard

Support for array style props

Open qoire opened this issue 2 years ago • 2 comments

Noticed that if we use array style props, the height and width element of the replacement element in the transform will be undefined, causing it to not show up, as an example:

<SkeletonPlaceholder>
  <View style={[{ width: 100 }, { height: 100 }]}>
</SkeletonPlaceholder>

We resolved this by recursively applying a flatten before we pass in the style props. But it seems like it could be supported from the library instead. Happy to submit a PR for this, just wanted to check my understanding.

qoire avatar Jan 26 '23 04:01 qoire

Having the same issue and flattening recursively doesn't help either! (using react-native-extended-stylesheet). Their flatten function gives the expected result but doesn't seem to work as intended.

PranavMurali avatar Jan 30 '23 12:01 PranavMurali

hey, I like the idea

@qoire feel free to open a PR if you want, I can merge and deploy a new version

chramos avatar Feb 07 '23 10:02 chramos