text decoration react native code example

Example 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

Example 2: text decoration react native

<Text style={styles.sampleStyle} >Something </Text>

var styles = StyleSheet.create({
  sampleStyle: {
    textDecorationLine: "underline",
    textDecorationStyle: "solid",
    textDecorationColor: "#000"
  }
});

Tags:

Misc Example