|
| 1 | +open ReactNative |
| 2 | +include NativeElement |
| 3 | + |
| 4 | +@react.component @module("@react-native-picker/picker") |
| 5 | +external make: ( |
| 6 | + ~ref: ref=?, |
| 7 | + // Picker props |
| 8 | + ~onValueChange: ('a, int) => unit=?, |
| 9 | + // value == string || float |
| 10 | + ~selectedValue: 'a=?, |
| 11 | + ~enabled: bool=?, |
| 12 | + // Android only |
| 13 | + ~dropdownIconColor: string=?, |
| 14 | + ~mode: [#dialog | #dropdown]=?, |
| 15 | + ~prompt: string=?, |
| 16 | + // iOS only |
| 17 | + ~itemStyle: ReactNative.Style.t=?, |
| 18 | + // rescript-react-native 0.64 View props |
| 19 | + ~accessibilityActions: array<Accessibility.actionInfo>=?, |
| 20 | + ~accessibilityElementsHidden: bool=?, |
| 21 | + ~accessibilityHint: string=?, |
| 22 | + ~accessibilityIgnoresInvertColors: bool=?, |
| 23 | + ~accessibilityLabel: string=?, |
| 24 | + ~accessibilityLiveRegion: Accessibility.liveRegion=?, |
| 25 | + ~accessibilityRole: Accessibility.role=?, |
| 26 | + ~accessibilityState: Accessibility.state=?, |
| 27 | + ~accessibilityValue: Accessibility.value=?, |
| 28 | + ~accessibilityViewIsModal: bool=?, |
| 29 | + ~accessible: bool=?, |
| 30 | + ~collapsable: bool=?, |
| 31 | + ~hitSlop: View.edgeInsets=?, |
| 32 | + ~importantForAccessibility: @string |
| 33 | + [ |
| 34 | + | #auto |
| 35 | + | #yes |
| 36 | + | #no |
| 37 | + | @as("no-hide-descendants") #noHideDescendants |
| 38 | + ]=?, |
| 39 | + ~nativeID: string=?, |
| 40 | + ~needsOffscreenAlphaCompositing: bool=?, |
| 41 | + ~onAccessibilityAction: Accessibility.actionEvent => unit=?, |
| 42 | + ~onAccessibilityEscape: unit => unit=?, |
| 43 | + ~onAccessibilityTap: unit => unit=?, |
| 44 | + ~onLayout: Event.layoutEvent => unit=?, |
| 45 | + ~onMagicTap: unit => unit=?, |
| 46 | + // Gesture Responder props |
| 47 | + ~onMoveShouldSetResponder: Event.pressEvent => bool=?, |
| 48 | + ~onMoveShouldSetResponderCapture: Event.pressEvent => bool=?, |
| 49 | + ~onResponderEnd: Event.pressEvent => unit=?, |
| 50 | + ~onResponderGrant: Event.pressEvent => unit=?, |
| 51 | + ~onResponderMove: Event.pressEvent => unit=?, |
| 52 | + ~onResponderReject: Event.pressEvent => unit=?, |
| 53 | + ~onResponderRelease: Event.pressEvent => unit=?, |
| 54 | + ~onResponderStart: Event.pressEvent => unit=?, |
| 55 | + ~onResponderTerminate: Event.pressEvent => unit=?, |
| 56 | + ~onResponderTerminationRequest: Event.pressEvent => bool=?, |
| 57 | + ~onStartShouldSetResponder: Event.pressEvent => bool=?, |
| 58 | + ~onStartShouldSetResponderCapture: Event.pressEvent => bool=?, |
| 59 | + ~pointerEvents: @string |
| 60 | + [ |
| 61 | + | #auto |
| 62 | + | #none |
| 63 | + | @as("box-none") #boxNone |
| 64 | + | @as("box-only") #boxOnly |
| 65 | + ]=?, |
| 66 | + ~removeClippedSubviews: bool=?, |
| 67 | + ~renderToHardwareTextureAndroid: bool=?, |
| 68 | + ~shouldRasterizeIOS: bool=?, |
| 69 | + ~style: Style.t=?, |
| 70 | + ~testID: string=?, |
| 71 | + ~children: React.element=?, |
| 72 | + // react-native-web 0.16 View props |
| 73 | + ~href: string=?, |
| 74 | + ~hrefAttrs: Web.hrefAttrs=?, |
| 75 | + ~onMouseDown: ReactEvent.Mouse.t => unit=?, |
| 76 | + ~onMouseEnter: ReactEvent.Mouse.t => unit=?, |
| 77 | + ~onMouseLeave: ReactEvent.Mouse.t => unit=?, |
| 78 | + ~onMouseMove: ReactEvent.Mouse.t => unit=?, |
| 79 | + ~onMouseOver: ReactEvent.Mouse.t => unit=?, |
| 80 | + ~onMouseOut: ReactEvent.Mouse.t => unit=?, |
| 81 | + ~onMouseUp: ReactEvent.Mouse.t => unit=?, |
| 82 | +) => React.element = "Picker" |
| 83 | + |
| 84 | +module Item = { |
| 85 | + @react.component @module("@react-native-picker/picker") @scope("Picker") |
| 86 | + external make: ( |
| 87 | + ~value: 'a=?, |
| 88 | + ~label: string, |
| 89 | + ~color: ReactNative.Color.t=?, |
| 90 | + ~testID: string=?, |
| 91 | + ) => React.element = "Item" |
| 92 | +} |
0 commit comments