Skip to content

Commit 66f6999

Browse files
authored
Merge pull request #2 from Naturalclar/docs/addUsage
docs: add usage to README
2 parents 2734636 + 1fe2021 commit 66f6999

File tree

1 file changed

+20
-3
lines changed

1 file changed

+20
-3
lines changed

README.md

Lines changed: 20 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -44,9 +44,26 @@ your `bsconfig.json`. Something like
4444

4545
## Usage
4646

47-
### Types
48-
49-
#### `ReactNativeLinearGradient.t`
47+
```re
48+
open ReactNative
49+
50+
module MyApp = {
51+
let styles = Style.(
52+
StyleSheet.create({
53+
"container": viewStyle(~flex=1., ())
54+
})
55+
);
56+
57+
[@react.component]
58+
let make = () => {
59+
<ReactNativeLinearGradient colors=[|"#faa", "#afa"|] style=styles##container>
60+
<Text>
61+
"Hello world"->React.string
62+
</Text>
63+
</ReactNativeLinearGradient>
64+
}
65+
};
66+
```
5067

5168
---
5269

0 commit comments

Comments
 (0)