10000 GitHub - zetamorph/slider: ReasonML / BuckleScript bindings for @react-native-community/slider
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

zetamorph/slider

 
 

Repository files navigation

@reason-react-native/slider

Build Status Version Chat

ReasonML / BuckleScript bindings for @react-native-community/slider.

Exposed as ReactNativeSomething module.

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

Installation

When @react-native-community/slider is properly installed & configured by following their installation instructions, you can install the bindings:

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

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

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

Usage

ReactNativeSlider.make(
  ~style: ReactNative.Style.t=?,
  ~value: float=?,
  ~step: float=?,
  ~minimumValue: float=?,
  ~maximumValue: float=?,
  ~minimumTrackTintColor: string=?,
  ~maximumTrackTintColor: string=?,
  ~disabled: bool=?,
  ~onSlidingStart: float => unit=?,
  ~onSlidingComplete: float => unit=?,
  ~onValueChange: float => unit=?,
  ~testID: string=?,
  ~children: React.element=?,
  // iOS Props
  ~maximumTrackImage: ReactNative.Image.Source.t=?,
  ~minimumTrackImage: ReactNative.Image.Source.t=?,
  ~thumbImage: ReactNative.Image.Source.t=?,
  ~trackImage: ReactNative.Image.Source.t=?,
  ~inverted: bool=?,
  // Android
  ~thumbTintColor: string=?

  // ... And all <View> props
)

Example

<ReactNativeSlider
  style={
    ReactNative.Style.(
      style(
        ~width=200.->dp,
        ~height=40.->dp,
        ()
      )
    )
  }
  minimumValue={0.}
  maximumValue={1.}
  minimumTrackTintColor="#FFFFFF"
  maximumTrackTintColor="#000000"
/>

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-community/slider

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • Reason 96.4%
  • JavaScript 3.6%
0