Answers for "backgroud color on text in 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
1

change background color react native

import React from 'react';
import { View } from 'react-native'

export default function App() {
  return (
    <View style={{ backgroundColor: "blue", flex: 1 }}> // this View element covers the entire screen thanks to "flex:1" 
    	//Write the rest of the app here
    </View>
  )
}
Posted by: Guest on July-21-2021

Code answers related to "backgroud color on text in react native"

Code answers related to "Javascript"

Browse Popular Code Answers by Language