Skip to content

Commit d08625d

Browse files
committed
bs-react-native-next: add Switch component.
1 parent 1235abb commit d08625d

2 files changed

Lines changed: 83 additions & 0 deletions

File tree

‎bs-react-native-next/src/Switch.bs.js‎

Lines changed: 2 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

‎bs-react-native-next/src/Switch.re‎

Lines changed: 81 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,81 @@
1+
[@react.component] [@bs.module "react-native"]
2+
external make:
3+
(
4+
~disabled: bool=?,
5+
~trackColor: Style.color=?,
6+
~ios_backgroundColor: Style.color=?,
7+
~onValueChange: bool => unit=?,
8+
~thumbColor: Style.color=?,
9+
~tintColor: Style.color=?,
10+
~value: bool=?,
11+
// View props
12+
~accessibilityComponentType: [@bs.string] [
13+
| `none
14+
| `button
15+
| `radiobutton_checked
16+
| `radiobutton_unchecked
17+
]
18+
=?,
19+
~accessibilityElementsHidden: bool=?,
20+
~accessibilityHint: string=?,
21+
~accessibilityIgnoresInvertColors: bool=?,
22+
~accessibilityLabel: string=?,
23+
~accessibilityLiveRegion: [@bs.string] [ | `none | `polite | `assertive]=?,
24+
~accessibilityRole: [@bs.string] [
25+
| `none
26+
| `button
27+
| `link
28+
| `search
29+
| `image
30+
| `keyboardkey
31+
| `text
32+
| `adjustable
33+
| `header
34+
| `summary
35+
| `imagebutton
36+
]
37+
=?,
38+
~accessibilityStates: array(Types.AccessibilityState.t)=?,
39+
~accessibilityTraits: array(Types.AccessibilityTrait.t)=?,
40+
~accessibilityViewIsModal: bool=?,
41+
~accessible: bool=?,
42+
~collapsable: bool=?,
43+
~hitSlop: Types.insets=?,
44+
~importantForAccessibility: [@bs.string] [
45+
| `auto
46+
| `yes
47+
| `no
48+
| [@bs.as "no-hide-descendants"]
49+
`noHideDescendants
50+
]
51+
=?,
52+
~nativeID: string=?,
53+
~needsOffscreenAlphaCompositing: bool=?,
54+
~onAccessibilityTap: unit => unit=?,
55+
~onLayout: Event.NativeLayoutEvent.t => unit=?,
56+
~onMagicTap: unit => unit=?,
57+
~onMoveShouldSetResponder: Event.NativeEvent.t => bool=?,
58+
~onMoveShouldSetResponderCapture: Event.NativeEvent.t => bool=?,
59+
~onResponderGrant: Event.NativeEvent.t => unit=?,
60+
~onResponderMove: Event.NativeEvent.t => unit=?,
61+
~onResponderReject: Event.NativeEvent.t => unit=?,
62+
~onResponderRelease: Event.NativeEvent.t => unit=?,
63+
~onResponderTerminate: Event.NativeEvent.t => unit=?,
64+
~onResponderTerminationRequest: Event.NativeEvent.t => unit=?,
65+
~onStartShouldSetResponder: Event.NativeEvent.t => bool=?,
66+
~onStartShouldSetResponderCapture: Event.NativeEvent.t => bool=?,
67+
~pointerEvents: [@bs.string] [
68+
| `auto
69+
| `none
70+
| [@bs.as "box-none"] `boxNone
71+
| [@bs.as "box-only"] `boxOnly
72+
]
73+
=?,
74+
~removeClippedSubviews: bool=?,
75+
~renderToHardwareTextureAndroid: bool=?,
76+
~shouldRasterizeIOS: bool=?,
77+
~style: Style.t=?,
78+
~testID: string=?
79+
) =>
80+
React.element =
81+
"Switch";

0 commit comments

Comments
 (0)