ide / react-native-button

A button for React apps
MIT License
773 stars 129 forks source link

Styling documentation #12

Open niftylettuce opened 9 years ago

niftylettuce commented 9 years ago

There isn't much documentation on how to style the View, Button, or Text. I'm therefore having to write my own button as such:

        <TouchableOpacity style={styles.buttonBg} onPress={this.onPress}>
          <Text style={styles.buttonText}>
            LOG IN
          </Text>
        </TouchableOpacity>
melihmucuk commented 9 years ago

If you set the style like this:

buttonContainer: {
    backgroundColor: '#66BB6A',
    color: 'white',
    padding: 10,
    margin: 5,
  },

backgroundColor specify background color of button, color specify text color inside of the button.

You should set like this: <Button style={styles.buttonContainer} ... />