Skip to content

Commit 347a454

Browse files
enieberMoOx
andauthored
Text: add example (#21)
* add sample text component with rescript * Update text.md Co-authored-by: Max Thirouin <git@moox.io>
1 parent 9cfe859 commit 347a454

File tree

1 file changed

+15
-0
lines changed

1 file changed

+15
-0
lines changed

Diff for: docs/text.md

+15
Original file line numberDiff line numberDiff line change
@@ -3,3 +3,18 @@ id: text
33
title: Text
44
wip: true
55
---
6+
7+
## Example
8+
9+
```res
10+
open ReactNative
11+
12+
let styles = {
13+
open Style
14+
StyleSheet.create({
15+
"title": textStyle(~fontSize=24., ~fontWeight=#_600, ()),
16+
})
17+
}
18+
19+
<Text style={styles["title"]}> {"Hello World"->React.string} </Text>
20+
```

0 commit comments

Comments
 (0)