Module PickerIOS-BsReactNative

let make: ?⁠itemStyle:BsReactNative.Style.t => ?⁠onValueChange:('value => unit) => ?⁠selectedValue:'value => ?⁠accessibilityLabel:ReasonReact.reactElement => ?⁠accessible:bool => ?⁠hitSlop:BsReactNative.Types.insets => ?⁠onAccessibilityTap:(unit => unit) => ?⁠onLayout:(BsReactNative.RNEvent.NativeLayoutEvent.t => unit) => ?⁠onMagicTap:(unit => unit) => ?⁠responderHandlers:BsReactNative.Types.touchResponderHandlers => ?⁠pointerEvents:BsReactNative.Types.pointerEvents => ?⁠removeClippedSubviews:bool => ?⁠style:BsReactNative.Style.t => ?⁠testID:string => ?⁠accessibilityComponentType:BsReactNative.Types.accessibilityComponentType => ?⁠accessibilityLiveRegion:BsReactNative.Types.accessibilityLiveRegion => ?⁠collapsable:bool => ?⁠importantForAccessibility:BsReactNative.Types.importantForAccessibility => ?⁠needsOffscreenAlphaCompositing:bool => ?⁠renderToHardwareTextureAndroid:bool => ?⁠accessibilityTraits:list(BsReactNative.Types.accessibilityTrait) => ?⁠accessibilityRole:BsReactNative.Types.accessibilityRole => ?⁠accessibilityStates:list(BsReactNative.Types.accessibilityState) => ?⁠accessibilityHint:string => ?⁠accessibilityIgnoresInvertColors:bool => ?⁠accessibilityViewIsModal:bool => ?⁠shouldRasterizeIOS:bool => array(ReasonReact.reactElement) => ReasonReact.component(ReasonReact.stateless, ReasonReact.noRetainedProps, ReasonReact.actionless);

Example of use

In order to render a PickerIOS https://facebook.github.io/react-native/docs/pickerios component you will need to pass one or many PickerIOS.Item component(s) as children.

And PickerIOS.Item has a required label prop

let component = ReasonReact.statelessComponent("MyComponent");

let make = _children => {
  ...component,
  render: _self =>
    <View>
      <PickerIOS>
        <PickerIOS.Item label="ReasonML" value="reason" />
        <PickerIOS.Item label="Ocaml" value="ocaml" />
        <PickerIOS.Item label="JavaScript" value="js" />
      </PickerIOS>
    </View>,
};
selectedValue and onValueChange
let component = ReasonReact.statelessComponent("MyComponent");

let make = _children => {
  ...component,
  render: _self =>
    <View>
      <PickerIOS selectedValue="ocaml" onValueChange=(value => Js.log(value))>
        <PickerIOS.Item label="ReasonML" value="reason" />
        <PickerIOS.Item label="Ocaml" value="ocaml" />
        <PickerIOS.Item label="JavaScript" value="js" />
      </PickerIOS>
    </View>,
};

Props

itemStyle
itemStyle: Style.t=?
onValueChange
onValueChange: 'value => unit=?
selectedValue
selectedValue: 'value=?
module Item: { ... };

PickerIOS.Item component is used only inside <PickerIOS></PickerIOS> component