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
Switchcomponent usage in official docs: https://facebook.github.io/react-native/docs/switchThis is a controlled component that requires an
onValueChangecallback that updates thevalueprop in order for the component to reflect user actions. If thevalueprop is not updated, the component will continue to render the suppliedvalueprop instead of the expected result of any user actions.As of React Native version 0.57,
tintColor,onTintColorandthumbTintColorhave been deprecated.Props
disabled
~disabled: bool=?trackColorTrue
~trackColorTrue: string=?trackColorFalse
~trackColorFalse: string=?iosBackgroundColor
~iosBackgroundColor: string=?onValueChange
~onValueChange: bool => unit=?thumbColor
~thumbColor: string=?value
~value: bool=?