Skip to content

Commit 6241793

Browse files
committed
fix rendering for both ios and android
1 parent 20cbac7 commit 6241793

File tree

1 file changed

+20
-13
lines changed

1 file changed

+20
-13
lines changed

examples/RNOneSignalTS/Helpers.tsx

Lines changed: 20 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,25 +1,24 @@
11
import {
2-
Button,
32
KeyboardAvoidingView,
43
StyleSheet,
4+
Text,
55
TextInput,
6-
View,
6+
TouchableOpacity,
77
} from 'react-native';
88

99
// const disabledColor = '#BEBEBE';
1010

1111
export const renderButtonView = (name: string, callback: Function) => {
1212
return (
13-
<View key={name + '_parent'} style={styles.buttonContainer}>
14-
<Button
15-
color="white"
16-
key={name}
17-
title={name}
18-
onPress={() => {
19-
callback();
20-
}}
21-
/>
22-
</View>
13+
<TouchableOpacity
14+
key={name + '_parent'}
15+
style={styles.buttonContainer}
16+
onPress={() => {
17+
callback();
18+
}}
19+
>
20+
<Text style={styles.buttonText}>{name}</Text>
21+
</TouchableOpacity>
2322
);
2423
};
2524

@@ -62,7 +61,15 @@ const styles = StyleSheet.create({
6261
borderRadius: 8,
6362
marginVertical: 10,
6463
marginHorizontal: 10,
65-
overflow: 'hidden',
64+
paddingVertical: 12,
65+
paddingHorizontal: 16,
66+
alignItems: 'center',
67+
justifyContent: 'center',
68+
},
69+
buttonText: {
70+
color: 'white',
71+
fontSize: 16,
72+
fontWeight: '600',
6673
},
6774
textInput: {
6875
marginHorizontal: 10,

0 commit comments

Comments
 (0)