button style not working react native
//React Native Button element doesn't have style props and offers very
//few customization. Use TochableXXX elements instead.
//TouchableOpacity works fine
//Or you can use Button from React-native-elements library
import {
TouchableOpacity,
Text,
} from "react-native";
<TouchableOpacity
style={styles.button}
onPress={this.onSubmit}
disabled={!this.state.isFormValid}
>
<Text style={styles.btnText}>Add
</Text>
</TouchableOpacity>
const styles = StyleSheet.create({
button: {
width: 200,
marginTop: 20,
backgroundColor: "green",
padding: 15,
borderRadius: 50,
},
btnText: {
color: "white",
fontSize: 20,
justifyContent: "center",
textAlign: "center",
},
});
Also in JavaScript:
- json datetime
- angular one way property binding
- js check if function is a constructor
- javascript true string to boolean
- random item from array javascript
- javascript how to trigger an event
- jquery copier dans le presse papier
- cubic root javascript
- money pipe angular
- Create a server which serves at port 3000 and with node.js command prompt
- ajax submit form data
- @editorjs/list window not defined
- vue js use component everywhere
- socket io broadcast to room
- Javascript clear canvas
- grpc node
- js unique using set
- javascript how to remove first element of array
- react web worker
- drop down listing in angular form
- jquery checkbox unchecked
- javascript add div
- tableau js
- Vuejs v-model when enter pressed