ReScript bindings for
react-native-linear-gradient
.
Exposed as ReactNativeLinearGradient
module.
@rescript-react-native/linear-gradient
X.y.* means it's compatible with
react-native-linear-gradient
X.y.*
When
react-native-linear-gradient
is properly installed & configured by following their installation instructions,
you can install the bindings:
npm install @rescript-react-native/linear-gradient
# or
yarn add @rescript-react-native/linear-gradient
@rescript-react-native/linear-gradient
should be added to bs-dependencies
in
your bsconfig.json
:
{
//...
"bs-dependencies": [
"@rescript/react",
"rescript-react-native",
// ...
+ "@rescript-react-native/linear-gradient"
],
//...
}
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>
}
};
Check the changelog for more informations about recent releases.
Read the contribution guidelines before contributing.
We want this community to be friendly and respectful to each other. Please read our full code of conduct so that you can understand what actions will and will not be tolerated.