Skip to content

ReasonML / BuckleScript bindings for react-native-linear-gradient

License

Notifications You must be signed in to change notification settings

Naturalclar/linear-gradient

 
 

Repository files navigation

@reason-react-native/linear-gradient

Build Status Version Chat

ReasonML / BuckleScript bindings for react-native-linear-gradient.

Exposed as ReactNativeLinearGradient module.

@reason-react-native/linear-gradient X.y._ means it's compatible with react-native-linear-gradient X.y._

Installation

When react-native-linear-gradient is properly installed & configured by following their installation instructions, you can install the bindings:

npm install @reason-react-native/linear-gradient
# or
yarn add @reason-react-native/linear-gradient

@reason-react-native/linear-gradient should be added to bs-dependencies in your bsconfig.json. Something like

{
  //...
  "bs-dependencies": [
    "reason-react",
    "reason-react-native",
    // ...
+    "@reason-react-native/linear-gradient"
  ],
  //...
}

Usage

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>
  }
};

Changelog

Check the changelog for more informations about recent releases.


Contribute

Read the contribution guidelines before contributing.

Code of Conduct

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.

About

ReasonML / BuckleScript bindings for react-native-linear-gradient

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Reason 80.9%
  • JavaScript 19.1%