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

Feature to support multiple shadows #161

Closed
weaintplastic opened this issue Aug 3, 2017 · 6 comments
Closed

Feature to support multiple shadows #161

weaintplastic opened this issue Aug 3, 2017 · 6 comments

Comments

@weaintplastic
Copy link
Contributor

Hi 👋🏻 ,

I'm Roland and recently fell in love with the great work that you're doing here and the endless possibilities that come with it. While already having some PR's running (you've probably noticed), I'd like to request a feature or better discuss the approach to introduce it.

Currently it is only possible to define a single box shadow. I'd like to add a feature to support multiple ones. While sketch already provides setting multiple shadows by passing in shadow styles in an array, the ViewRenderer as well as ImageRenderer do only support resolving the style for one shadow.

https://github.com/airbnb/react-sketchapp/blob/master/src/renderers/ViewRenderer.js#L48
https://github.com/airbnb/react-sketchapp/blob/master/src/renderers/ViewRenderer.js#L104

As a proposal (happy to discuss) I'd suggest to create a style property called shadowGroup in parallel. Each of them holding styles for an individual shadow. I'd still keep the current implementation in place for backwards-compatibility. So creating multiple shadows would be an opt-in functionality.

Let me know what you think.

Roland

@ianhook
Copy link
Collaborator

ianhook commented Aug 4, 2017

While this probably will work great in Sketch, it will not work correctly when rendered anywhere else. Setting aside whether this should allow users access to the full power of sketch, if it does do, it should do so in a way that users unfamiliar to React Native can use the component with full knowledge of what they're getting themselves into.

@jemgold
Copy link
Contributor

jemgold commented Aug 4, 2017 via email

@weaintplastic
Copy link
Contributor Author

Thank's so much providing some background on your opinions. Really appreciate that. I totally agree to leave this open for a little while longer and see what others think.

Roland

@mrtnbroder
Copy link

I'd agree that this project here should add as much sketch features as possible and not care so much about the cross-platform integrations. I mean, it is a fine goal to achieve cross-platform support, but since sketch is a totally different program, it is just not possible. I'd like to get all the power of sketch within this project.

@mathieudutour
Copy link
Collaborator

fixed in #373

@weaintplastic
Copy link
Contributor Author

@thierryc amazing. Looking forward to the next release! @mathieudutour

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

No branches or pull requests

5 participants