- Notifications
You must be signed in to change notification settings - Fork0
martinmoec/Fable.ReactNative.ImagePicker
Folders and files
Name | Name | Last commit message | Last commit date | |
---|---|---|---|---|
Repository files navigation
Fable bindings forreact-native-image-picker.
Add npm module:
yarn add react-native-image-picker
Install Pod
cd ios && pod install
Add NuGet package
dotnet add package Fable.ReactNative.ImagePicker
or addFable.ReactNative.ImagePicker
to your paket.dependencies
This package provides bindings as well as the helper functionsshowImagePicker
,launchCamera
andlaunchImageLibrary
which lets you call thereact-native-image-picker
equivalents with a list of props in the familiarFable.React
way. The functions has the following signature.
seq<ImagePickerProps>->(PickerResponse-> unit)-> unit
Provide a list of properties along with a callback function containing the response. SeeImagePickerProps
andPickerResponse
inFable.ReactNative.ImagePicker.fs
and thereact-native-image-picker
documentation for further details.
openFable.ReactNative.ImagePicker// open camera/library modalshowImagePicker[ Title"Select image" MediaType MediaType.Photo](fun response->ifnot response.didCancelthen// do something with base-64 image response.data)// open camera directlylaunchCamera[](fun response->// do something with response)// open library directlylaunchImageLibrary[](fun response->// do something with response)
About
Fable bindings for react-native-image-picker
Resources
Uh oh!
There was an error while loading.Please reload this page.