react native italic text 1

react native italic text

I'm bold!
I'm italic!
I'm underlined!

const styles = StyleSheet.create({
    bold: {fontWeight: 'bold'},
    italic: {fontStyle: 'italic'},
    underline: {textDecorationLine: 'underline'}
})

Here is what the above code is Doing:
1. We’re creating a new StyleSheet object.
2. We’re creating a new style object called bold.
3. We’re creating a new style object called italic.
4. We’re creating a new style object called underline.
5. We’re applying the bold style to the first Text component.
6. We’re applying the italic style to the second Text component.
7. We’re applying the underline style to the third Text component.

Similar Posts