@alfonsogarciacaro promised to add this to react native bindings once things moved to 1.0 :P
open Fable.Core.JsInterop
module R = Fable.Helpers.React
type RCom = Fable.Import.React.ComponentClass<obj>
let SignaturePad: RCom = importDefault "react-native-signature-pad"
/// Opens a signature pad with callbacks for onError and onChange
let signaturePad (props:Fable.Helpers.ReactNative.Props.IStyle list) (onError:exn -> unit) (onChange:string -> unit) : React.ReactElement =
let onChange (o:obj) = onChange(o?base64DataUrl |> unbox)
let pad =
createObj
[ "style" ==> props
"onError" ==> onError
"onChange" ==> onChange ]
|> unbox
R.from SignaturePad pad []
@alfonsogarciacaro promised to add this to react native bindings once things moved to 1.0 :P