border react native
button: {
borderWidth: 4,
borderColor: "#20232a",
}
border react native
button: {
borderWidth: 4,
borderColor: "#20232a",
}
react native generate stylesheet with function
styleFunction (option) {
return {
borderWidth: 2,
margin: option,
}
}
<View style={this.styleFunction(15)}>
//things
</View>
styles in react native
//Import
import { StyleSheet} from 'react-native';
//Add style in React native component this way
<View style={styles.container}>
</View>
//create your style this way
const styles = StyleSheet.create({
container: {
marginTop: 50,
},
});
react native stylesheet shortcut
rnss
//is the shortcut for
const styles = StyleSheet.create({
})
does react native use css
Not exactly CSS, the style names and values usually match how CSS works on
the web, except names are written using camel casing, e.g. backgroundColor
instead of background-color.
Copyright © 2021 Codeinu
Forgot your account's password or having trouble logging into your Account? Don't worry, we'll help you to get back your account. Enter your email address and we'll send you a recovery link to reset your password. If you are experiencing problems resetting your password contact us