Last active
July 22, 2020 04:25
-
-
Save jasurkurbanov/402fb125c969974eff32a0dcbc0df170 to your computer and use it in GitHub Desktop.
For Custom Text Component Tutorial
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import * as React from 'react'; | |
import { Text, View, StyleSheet } from 'react-native'; | |
export default function App() { | |
return ( | |
<View style={styles.container}> | |
<Text style={styles.h1}>Heading 1</Text> | |
<Text style={styles.h2}>Heading 2</Text> | |
<Text style={styles.h3}>Heading 3</Text> | |
<Text style={styles.h4}>Heading 4</Text> | |
<Text style={styles.h5}>Heading 5</Text> | |
</View> | |
); | |
} | |
const styles = StyleSheet.create({ | |
container: { | |
flex: 1, | |
justifyContent: 'center', | |
}, | |
h1: { | |
fontSize: 20 | |
}, | |
h2: { | |
fontSize: 18 | |
}, | |
h3: { | |
fontSize: 16 | |
}, | |
h4: { | |
fontSize: 14 | |
}, | |
h5: { | |
fontSize: 12 | |
}, | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment