forked from BlueWallet/BlueWallet
-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge remote-tracking branch 'upstream/master'
- Loading branch information
Showing
74 changed files
with
1,693 additions
and
715 deletions.
There are no files selected for viewing
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
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
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
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
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
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
This file was deleted.
Oops, something went wrong.
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,41 @@ | ||
import React, { forwardRef } from 'react'; | ||
import { TouchableOpacity, View, Text, StyleProp, ViewStyle, StyleSheet } from 'react-native'; | ||
import { useTheme } from './themes'; | ||
|
||
interface SquareButtonProps { | ||
title: string; | ||
onPress: () => void; | ||
style: StyleProp<ViewStyle>; | ||
testID?: string; | ||
} | ||
|
||
export const SquareButton = forwardRef<TouchableOpacity, SquareButtonProps>((props, ref) => { | ||
const { title, onPress, style, testID } = props; | ||
const { colors } = useTheme(); | ||
|
||
const hookStyles = StyleSheet.create({ | ||
text: { | ||
color: colors.buttonTextColor, | ||
}, | ||
}); | ||
|
||
return ( | ||
<TouchableOpacity ref={ref} style={style} onPress={onPress} testID={testID} accessibilityRole="button"> | ||
<View style={styles.contentContainer}> | ||
<Text style={[styles.text, hookStyles.text]}>{title}</Text> | ||
</View> | ||
</TouchableOpacity> | ||
); | ||
}); | ||
|
||
const styles = StyleSheet.create({ | ||
contentContainer: { | ||
flexDirection: 'row', | ||
justifyContent: 'center', | ||
alignItems: 'center', | ||
}, | ||
text: { | ||
marginHorizontal: 8, | ||
fontSize: 16, | ||
}, | ||
}); |
Oops, something went wrong.