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//Or you can use Button from React-native-elements library
5
6import {
7 TouchableOpacity,
8 Text,
9} from "react-native";
10
11<TouchableOpacity
12 style={styles.button}
13 onPress={this.onSubmit}
14 disabled={!this.state.isFormValid}
15 >
16 <Text style={styles.btnText}>Add
17 </Text>
18</TouchableOpacity>
19
20const styles = StyleSheet.create({
21
22 button: {
23 width: 200,
24 marginTop: 20,
25 backgroundColor: "green",
26 padding: 15,
27 borderRadius: 50,
28 },
29 btnText: {
30 color: "white",
31 fontSize: 20,
32 justifyContent: "center",
33 textAlign: "center",
34 },
35});