Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support for array style props #112

Open
qoire opened this issue Jan 26, 2023 · 2 comments
Open

Support for array style props #112

qoire opened this issue Jan 26, 2023 · 2 comments

Comments

@qoire
Copy link

qoire commented Jan 26, 2023

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.

@PranavMurali
Copy link

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.

@chramos
Copy link
Owner

chramos commented Feb 7, 2023

hey, I like the idea

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants