Answers for "react native make text center when page"

0

how to align text inside react component

Add textAlign: 'center' and it will center the text horizontally.

  headline: {
    textAlign: 'center', // <-- the magic
    fontWeight: 'bold',
    fontSize: 18,
    marginTop: 0,
    width: 200,
    backgroundColor: 'yellow',
  }
Posted by: Guest on February-14-2020

Code answers related to "react native make text center when page"

Code answers related to "Javascript"

Browse Popular Code Answers by Language