Answers for "color text react-native"

1

color text react native

// Some code....
<Text 
	// Topic 2: Text Style
	style={styles.headline}>Hi, Lunox!
</Text>

// Some code....

headline: {
	color: 'white', // <-- The magic
	textAlign: 'center', // <-- The magic
	fontWeight: 'bold',
	fontSize: 50,
	backgroundColor: 'purple',
}
// Some code....

Look how I use it here:
https://github.com/Lunox-code/100dayscode-react.native/blob/master/App.js
Posted by: Guest on October-28-2020
3

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,
  },
});
Posted by: Guest on November-20-2020

Code answers related to "color text react-native"

Code answers related to "Javascript"

Browse Popular Code Answers by Language