Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
…e-next. (facebook#346)
  • Loading branch information
cknitt authored and MoOx committed Mar 21, 2019
1 parent cc3e6d2 commit 374836c
Show file tree
Hide file tree
Showing 63 changed files with 3,093 additions and 7 deletions.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

84 changes: 84 additions & 0 deletions bs-react-native-next/src/ActivityIndicator.re
Original file line number Diff line number Diff line change
@@ -0,0 +1,84 @@
type size;

let small: size = "small"->Obj.magic;
let large: size = "large"->Obj.magic;
external exactSize: float => size = "%identity";

[@react.component] [@bs.module "react-native"]
external make:
(
~animating: bool=?,
~color: Style.color=?,
~size: size=?,
~hidesWhenStopped: bool=?,
// View props
~accessibilityComponentType: [@bs.string] [
| `none
| `button
| `radiobutton_checked
| `radiobutton_unchecked
]
=?,
~accessibilityElementsHidden: bool=?,
~accessibilityHint: string=?,
~accessibilityIgnoresInvertColors: bool=?,
~accessibilityLabel: string=?,
~accessibilityLiveRegion: [@bs.string] [ | `none | `polite | `assertive]=?,
~accessibilityRole: [@bs.string] [
| `none
| `button
| `link
| `search
| `image
| `keyboardkey
| `text
| `adjustable
| `header
| `summary
| `imagebutton
]
=?,
~accessibilityStates: array(Types.AccessibilityState.t)=?,
~accessibilityTraits: array(Types.AccessibilityTrait.t)=?,
~accessibilityViewIsModal: bool=?,
~accessible: bool=?,
~collapsable: bool=?,
~hitSlop: Types.insets=?,
~importantForAccessibility: [@bs.string] [
| `auto
| `yes
| `no
| [@bs.as "no-hide-descendants"]
`noHideDescendants
]
=?,
~nativeID: string=?,
~needsOffscreenAlphaCompositing: bool=?,
~onAccessibilityTap: unit => unit=?,
~onLayout: Event.NativeLayoutEvent.t => unit=?,
~onMagicTap: unit => unit=?,
~onMoveShouldSetResponder: Event.NativeEvent.t => bool=?,
~onMoveShouldSetResponderCapture: Event.NativeEvent.t => bool=?,
~onResponderGrant: Event.NativeEvent.t => unit=?,
~onResponderMove: Event.NativeEvent.t => unit=?,
~onResponderReject: Event.NativeEvent.t => unit=?,
~onResponderRelease: Event.NativeEvent.t => unit=?,
~onResponderTerminate: Event.NativeEvent.t => unit=?,
~onResponderTerminationRequest: Event.NativeEvent.t => unit=?,
~onStartShouldSetResponder: Event.NativeEvent.t => bool=?,
~onStartShouldSetResponderCapture: Event.NativeEvent.t => bool=?,
~pointerEvents: [@bs.string] [
| `auto
| `none
| [@bs.as "box-none"] `boxNone
| [@bs.as "box-only"] `boxOnly
]
=?,
~removeClippedSubviews: bool=?,
~renderToHardwareTextureAndroid: bool=?,
~shouldRasterizeIOS: bool=?,
~style: Style.t=?,
~testID: string=?
) =>
React.element =
"ActivityIndicator";
2 changes: 2 additions & 0 deletions bs-react-native-next/src/Alert.bs.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

38 changes: 38 additions & 0 deletions bs-react-native-next/src/Alert.re
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
type options;

[@bs.obj]
external options:
(~cancelable: bool=?, ~onDismiss: unit => unit=?, unit) => options =
"";

type button;

[@bs.obj]
external button:
(
~text: string=?,
~onPress: unit => unit=?,
~style: [@bs.string] [ | `default | `cancel | `destructive]=?,
unit
) =>
button =
"";

[@bs.scope "Alert"] [@bs.module "react-native"]
external alert:
(
~title: string,
~message: string=?,
~buttons: array(button)=?,
~options: options=?,
~type_: [@bs.string] [
| `default
| `plainText
| `secureText
| `loginPassword
]
=?,
unit
) =>
unit =
"alert";
Loading

0 comments on commit 374836c

Please sign in to comment.