Skip to content

Commit

Permalink
Merge pull request #2 from Naturalclar/docs/addUsage
Browse files Browse the repository at this point in the history
docs: add usage to README
  • Loading branch information
Naturalclar authored Jan 19, 2020
2 parents 2734636 + 1fe2021 commit 66f6999
Showing 1 changed file with 20 additions and 3 deletions.
23 changes: 20 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -44,9 +44,26 @@ your `bsconfig.json`. Something like

## Usage

### Types

#### `ReactNativeLinearGradient.t`
```re
open ReactNative

module MyApp = {
let styles = Style.(
StyleSheet.create({
"container": viewStyle(~flex=1., ())
})
);

[@react.component]
let make = () => {
<ReactNativeLinearGradient colors=[|"#faa", "#afa"|] style=styles##container>
<Text>
"Hello world"->React.string
</Text>
</ReactNativeLinearGradient>
}
};
```

---

Expand Down

0 comments on commit 66f6999

Please sign in to comment.