1//React Native Button element doesn't have style props and offers very
2//few customization. Use TochableXXX elements instead.
3//TouchableOpacity works fine
4
5import {
6 TouchableOpacity,
7 Text,
8} from "react-native";
9
10<TouchableOpacity
11 style={styles.button}
12 onPress={this.onSubmit}
13 disabled={!this.state.isFormValid}
14 >
15 <Text style={styles.btnText}>Add
16 </Text>
17</TouchableOpacity>
18
19const styles = StyleSheet.create({
20
21 button: {
22 width: 200,
23 marginTop: 20,
24 backgroundColor: "green",
25 padding: 15,
26 borderRadius: 50,
27 },
28 btnText: {
29 color: "white",
30 fontSize: 20,
31 justifyContent: "center",
32 textAlign: "center",
33 },
34});