Last active
October 29, 2021 11:15
-
-
Save arnoldc/473f6b74fadcd83fcd0f31765b217d64 to your computer and use it in GitHub Desktop.
[React Native] Styling
This file contains hidden or 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
| // ways | |
| <Text style={styles.paragraph} /> | |
| <Text style={{ fontSize: 16 }} /> | |
| <Text style={[styles.paragraph, { color: 'red' }]} /> | |
| // dynamic | |
| // Applies the `selected` style on top of the `paragraph` style if props.isActive is truthy | |
| function Item(props) { | |
| return ( | |
| <Text style={[styles.paragraph, props.isActive && styles.selected]} /> | |
| ); | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment