This repository has been archived by the owner on Jun 16, 2022. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 113
Button component, using rn-gesture-handler #225
Merged
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
gre
reviewed
Sep 26, 2018
gre
reviewed
Sep 26, 2018
gre
reviewed
Sep 26, 2018
gre
reviewed
Sep 26, 2018
/> | ||
</LText> | ||
</View> | ||
<RectButton onPress={this.goToOperationDetails} style={styles.root}> |
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.
curious about the reason to not use Touchable
that you moved to use RectButton?
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.
Touchable
would have added hitSlop
which would have needed to be reset, and also added some logic that is not needed in that case, so I went for "raw" RectButton
valpinkman
approved these changes
Sep 26, 2018
gre
approved these changes
Sep 26, 2018
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.
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
HODL(edit: added the fallback, this can be merged): there is currently a bug when using rn-gesture-handler inside Modalcontext:
I suppose I will fallback to classic TouchableOpacity using a
fallback
prop when using inside Modals.This PR unify the way buttons are created in the app: now, single
Button
component, accepting atype
prop. Accepted types are:primary
: the good ol' "live blue" plain buttonsecondary
: grey outlined buttontertiary
: blue outlined buttonalert
: plain red buttonLet's try to reduce at maximum the styling of buttons inside screens, in favor of creating new button theme if needed.
It also brings rn-gesture-handler for row-like interactions (operations..)