|  | 
|  | 1 | +[@bs.module "react-native"] | 
|  | 2 | +external view : ReasonReact.reactClass = "TouchableNativeFeedback"; | 
|  | 3 | + | 
|  | 4 | +type t; | 
|  | 5 | + | 
|  | 6 | +[@bs.module "react-native"] [@bs.scope "TouchableNativeFeedback"] | 
|  | 7 | +external selectableBackground : unit => t = "SelectableBackground"; | 
|  | 8 | + | 
|  | 9 | +[@bs.module "react-native"] [@bs.scope "TouchableNativeFeedback"] | 
|  | 10 | +external selectableBackgroundBorderless : unit => t = | 
|  | 11 | + "SelectableBackgroundBorderless"; | 
|  | 12 | + | 
|  | 13 | +[@bs.module "react-native"] [@bs.scope "TouchableNativeFeedback"] | 
|  | 14 | +external canUseNativeForeground : unit => t = "CanUseNativeForeground"; | 
|  | 15 | + | 
|  | 16 | +[@bs.module "react-native"] [@bs.scope "TouchableNativeFeedback"] | 
|  | 17 | +external ripple : (string, bool) => t = "Ripple"; | 
|  | 18 | + | 
|  | 19 | +let make = | 
|  | 20 | + ( | 
|  | 21 | + ~accessible=?, | 
|  | 22 | + ~accessibilityLabel=?, | 
|  | 23 | + ~accessibilityComponentType=?, | 
|  | 24 | + ~accessibilityTraits=?, | 
|  | 25 | + ~delayLongPress=?, | 
|  | 26 | + ~delayPressIn=?, | 
|  | 27 | + ~delayPressOut=?, | 
|  | 28 | + ~disabled=?, | 
|  | 29 | + ~hitSlop=?, | 
|  | 30 | + ~onLayout=?, | 
|  | 31 | + ~onLongPress=?, | 
|  | 32 | + ~onPress=?, | 
|  | 33 | + ~onPressIn=?, | 
|  | 34 | + ~onPressOut=?, | 
|  | 35 | + ~pressRetentionOffset=?, | 
|  | 36 | + ~style=?, | 
|  | 37 | + ~background=?, | 
|  | 38 | + ~useForeground=?, | 
|  | 39 | + ) => | 
|  | 40 | + ReasonReact.wrapJsForReason( | 
|  | 41 | + ~reactClass=view, | 
|  | 42 | + ~props= | 
|  | 43 | + Js.Undefined.( | 
|  | 44 | + { | 
|  | 45 | + "accessible": fromOption(UtilsRN.optBoolToOptJsBoolean(accessible)), | 
|  | 46 | + "accessibilityLabel": fromOption(accessibilityLabel), | 
|  | 47 | + "delayLongPress": fromOption(delayLongPress), | 
|  | 48 | + "delayPressIn": fromOption(delayPressIn), | 
|  | 49 | + "delayPressOut": fromOption(delayPressOut), | 
|  | 50 | + "disabled": fromOption(UtilsRN.optBoolToOptJsBoolean(disabled)), | 
|  | 51 | + "hitSlop": fromOption(hitSlop), | 
|  | 52 | + "onLayout": fromOption(onLayout), | 
|  | 53 | + "onLongPress": fromOption(onLongPress), | 
|  | 54 | + "onPress": fromOption(onPress), | 
|  | 55 | + "background": fromOption(background), | 
|  | 56 | + "onPressIn": fromOption(onPressIn), | 
|  | 57 | + "onPressOut": fromOption(onPressOut), | 
|  | 58 | + "pressRetentionOffset": fromOption(pressRetentionOffset), | 
|  | 59 | + "style": fromOption(style), | 
|  | 60 | + "useForeground": | 
|  | 61 | + fromOption(UtilsRN.optBoolToOptJsBoolean(useForeground)), | 
|  | 62 | + "accessibilityComponentType": | 
|  | 63 | + fromOption( | 
|  | 64 | + UtilsRN.option_map( | 
|  | 65 | + x => | 
|  | 66 | + switch (x) { | 
|  | 67 | + | `none => "none" | 
|  | 68 | + | `button => "button" | 
|  | 69 | + | `radiobutton_checked => "radiobutton_checked-none" | 
|  | 70 | + | `radiobutton_unchecked => "radiobutton_unchecked" | 
|  | 71 | + }, | 
|  | 72 | + accessibilityComponentType, | 
|  | 73 | + ), | 
|  | 74 | + ), | 
|  | 75 | + "accessibilityTraits": | 
|  | 76 | + fromOption( | 
|  | 77 | + UtilsRN.option_map( | 
|  | 78 | + traits => { | 
|  | 79 | + let to_string = | 
|  | 80 | + fun | 
|  | 81 | + | `none => "none" | 
|  | 82 | + | `button => "button" | 
|  | 83 | + | `link => "link" | 
|  | 84 | + | `header => "header" | 
|  | 85 | + | `search => "search" | 
|  | 86 | + | `image => "image" | 
|  | 87 | + | `selected => "selected" | 
|  | 88 | + | `plays => "plays" | 
|  | 89 | + | `key => "key" | 
|  | 90 | + | `text => "text" | 
|  | 91 | + | `summary => "summary" | 
|  | 92 | + | `disabled => "disabled" | 
|  | 93 | + | `frequentUpdates => "frequentUpdates" | 
|  | 94 | + | `startsMedia => "startsMedia" | 
|  | 95 | + | `adjustable => "adjustable" | 
|  | 96 | + | `allowsDirectInteraction => "allowsDirectInteraction" | 
|  | 97 | + | `pageTurn => "pageTurn"; | 
|  | 98 | + traits |> List.map(to_string) |> Array.of_list; | 
|  | 99 | + }, | 
|  | 100 | + accessibilityTraits, | 
|  | 101 | + ), | 
|  | 102 | + ), | 
|  | 103 | + } | 
|  | 104 | + ), | 
|  | 105 | + ); | 
0 commit comments