The Wayback Machine - https://web.archive.org/web/20201030180320/https://github.com/reason-react-native/image-picker
Skip to content
master
Go to file
Code

Latest commit

 

Git stats

Files

Permalink
Failed to load latest commit information.
Type
Name
Latest commit message
Commit time
src
 
 
 
 
 
 
 
 
 
 
 
 
 
 

README.md

@reason-react-native/image-picker

Build Status Version Chat

ReasonML / BuckleScript bindings for react-native-image-picker.

Exposed as ReactNativeImagePicker module.

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

Installation

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

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

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

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

Usage

open ReactNativeImagePicker;

ImagePicker.(
  launchCamera(
    Options.make(
      ~title="Take a picture",
      ~cameraType=`back,
      ~mediaType=`photo,
      ~permissionDenied=
        Options.PermissionDenied.options(
          ~title="Permission denied !",
          ~text="text",
          ~reTryTitle="Retry",
          ~okTitle="Ok !",
        ),
      (),
    ),
    res => {
      Js.log(res##uri);
      Js.log(res##path);
    }
  )
);

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.

You can’t perform that action at this time.