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

Linear Gradient as background fill #78

Open
Michaelvons opened this issue Jan 8, 2020 · 2 comments
Open

Linear Gradient as background fill #78

Michaelvons opened this issue Jan 8, 2020 · 2 comments

Comments

@Michaelvons
Copy link

How can linear-gradient be implemented as a background fill?

@Michaelvons Michaelvons changed the title Linear Gradient as background Color Linear Gradient as background fill Jan 8, 2020
@montycheese
Copy link

montycheese commented Sep 5, 2020

@Michaelvons ,

I added a workaround to use linear gradients this on a fork I created. It's not pull-request worthy but hopefully will help you out. It works for my usecase.

One thing to note is that the backgroundColor prop is heavily coupled into the codebase. It affects the animations and transitions, so you'll still have to specify a backgroundColor even though it isn't relevant for gradient backgrounds (with my workaround)

montycheese@13f16b8

@darrylyoung
Copy link
Contributor

Good idea!

For anyone else looking to do this, you can make the same (or similar) changes as shown in the example above, and then run the following to create a patch which can install during npm i as part of the postinstall script.

npx patch-package react-native-onboarding-swiper

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

4 participants