-
-
Notifications
You must be signed in to change notification settings - Fork 4.7k
Add LinearGradient from Expo to Button #557
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
Add LinearGradient from Expo to Button #557
Conversation
| const Touchable = | ||
| Platform.OS === 'android' ? TouchableNativeFeedback : TouchableOpacity; | ||
| const ButtonContainer = linearGradientProps | ||
| ? require('expo').LinearGradient |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'd be curious to see what happens when I pass linearGradientProps when not using expo.
Since there is no fallback, I would think this would throw an error. But I am willing to merge it and try it out.
Monte9
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
lgtm
|
I am curious to try this out. Merging this into Also we need documentation for this. But since the Button component on Thanks for the PR @martinezguillaume! 💯 |
|
Beautiful! 😍 I love it! |
|
If someone can test it's behaviour on non-expo apps, that would be great. |

First implementation of a LinearGradient button for the v1.
LinearGradient from expo has different props like colors, start, end and locations to play with colors.
You can add this props to
linearGradientPropsprop.Of course, this feature is only available for expo user to make it simple to have gradient button.