diff --git a/docs/next/style.html b/docs/next/style.html index f55929b77a2..17e501b897b 100644 --- a/docs/next/style.html +++ b/docs/next/style.html @@ -40,7 +40,7 @@ import { AppRegistry, StyleSheet, Text, View } from 'react-native'; const styles = StyleSheet.create({ - bigblue: { + bigBlue: { color: 'blue', fontWeight: 'bold', fontSize: 30, @@ -55,9 +55,9 @@ return ( <View> <Text style={styles.red}>just red</Text> - <Text style={styles.bigblue}>just bigblue</Text> - <Text style={[styles.bigblue, styles.red]}>bigblue, then red</Text> - <Text style={[styles.red, styles.bigblue]}>red, then bigblue</Text> + <Text style={styles.bigBlue}>just bigBlue</Text> + <Text style={[styles.bigBlue, styles.red]}>bigBlue, then red</Text> + <Text style={[styles.red, styles.bigBlue]}>red, then bigBlue</Text> </View> ); } @@ -65,7 +65,7 @@ // skip this line if using Create React Native App AppRegistry.registerComponent('AwesomeProject', () => LotsOfStyles); - +

One common pattern is to make your component accept a style prop which in turn is used to style subcomponents. You can use this to make styles "cascade" the way they do in CSS.

There are a lot more ways to customize text style. Check out the Text component reference for a complete list.

diff --git a/docs/next/style/index.html b/docs/next/style/index.html index f55929b77a2..17e501b897b 100644 --- a/docs/next/style/index.html +++ b/docs/next/style/index.html @@ -40,7 +40,7 @@ import { AppRegistry, StyleSheet, Text, View } from 'react-native'; const styles = StyleSheet.create({ - bigblue: { + bigBlue: { color: 'blue', fontWeight: 'bold', fontSize: 30, @@ -55,9 +55,9 @@ return ( <View> <Text style={styles.red}>just red</Text> - <Text style={styles.bigblue}>just bigblue</Text> - <Text style={[styles.bigblue, styles.red]}>bigblue, then red</Text> - <Text style={[styles.red, styles.bigblue]}>red, then bigblue</Text> + <Text style={styles.bigBlue}>just bigBlue</Text> + <Text style={[styles.bigBlue, styles.red]}>bigBlue, then red</Text> + <Text style={[styles.red, styles.bigBlue]}>red, then bigBlue</Text> </View> ); } @@ -65,7 +65,7 @@ // skip this line if using Create React Native App AppRegistry.registerComponent('AwesomeProject', () => LotsOfStyles); - +

One common pattern is to make your component accept a style prop which in turn is used to style subcomponents. You can use this to make styles "cascade" the way they do in CSS.

There are a lot more ways to customize text style. Check out the Text component reference for a complete list.