Open Michaelvons opened 4 years ago
@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)
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
How can linear-gradient be implemented as a background fill?