Skip to content
This repository has been archived by the owner on Jun 16, 2022. It is now read-only.

Button component, using rn-gesture-handler #225

Merged
merged 3 commits into from
Sep 26, 2018
Merged

Conversation

meriadec
Copy link
Member

@meriadec meriadec commented Sep 26, 2018

HODL (edit: added the fallback, this can be merged): there is currently a bug when using rn-gesture-handler inside Modal
context:

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 a type prop. Accepted types are:

  • primary: the good ol' "live blue" plain button
  • secondary: grey outlined button
  • tertiary: blue outlined button
  • alert: plain red button

Let'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..)

full

@meriadec meriadec added HODL and removed HODL labels Sep 26, 2018
src/components/Button.js Outdated Show resolved Hide resolved
src/components/Button.js Outdated Show resolved Hide resolved
/>
</LText>
</View>
<RectButton onPress={this.goToOperationDetails} style={styles.root}>
Copy link
Contributor

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?

Copy link
Member Author

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

Copy link
Contributor

@gre gre left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

obamanotbad

@gre gre merged commit 595d984 into LedgerHQ:develop Sep 26, 2018
@meriadec meriadec deleted the buttons branch October 12, 2018 11:48
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants