Module Switch-BsReactNative

let make: ?⁠disabled:bool => ?⁠trackColorTrue:string => ?⁠trackColorFalse:string => ?⁠iosBackgroundColor:string => ?⁠onValueChange:(bool => unit) => ?⁠thumbColor:string => ?⁠value:bool => ?⁠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, unit);

A component that renders Switch component usage in official docs: https://facebook.github.io/react-native/docs/switch

This is a controlled component that requires an onValueChange callback that updates the value prop in order for the component to reflect user actions. If the value prop is not updated, the component will continue to render the supplied value prop instead of the expected result of any user actions.

As of React Native version 0.57, tintColor, onTintColor and thumbTintColor have been deprecated.

Props

View props

disabled
~disabled: bool=?
trackColorTrue
~trackColorTrue: string=?
trackColorFalse
~trackColorFalse: string=?
iosBackgroundColor
~iosBackgroundColor: string=?
onValueChange
~onValueChange: bool => unit=?
thumbColor
~thumbColor: string=?
value
~value: bool=?