Skip to content

Commit 1cd273d

Browse files
committed
bs-react-native-next: add Modal
1 parent d08625d commit 1cd273d

2 files changed

Lines changed: 51 additions & 0 deletions

File tree

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

Lines changed: 16 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/Modal.re‎

Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
module Orientation = {
2+
type t;
3+
4+
external fromString: string => t = "%identity";
5+
6+
let landscape = "landscape"->fromString;
7+
let landscapeLeft = "landscape-left"->fromString;
8+
let landscapeRight = "landscape-right"->fromString;
9+
let portrait = "portrait"->fromString;
10+
let portraitUpsideDown = "portrait-upside-down"->fromString;
11+
};
12+
13+
[@react.component] [@bs.module "react-native"]
14+
external make:
15+
(
16+
~animationType: [@bs.string] [ | `none | `slide | `fade]=?,
17+
~hardwareAccelerated: bool=?,
18+
~onDismiss: unit => unit=?,
19+
~onOrientationChange: unit => unit=?,
20+
~onRequestClose: unit => unit=?,
21+
~onShow: unit => unit=?,
22+
~presentationStyle: [@bs.string] [
23+
| `fullScreen
24+
| `pageSheet
25+
| `formSheet
26+
| `overFullScreen
27+
]
28+
=?,
29+
~supportedOrientations: array(Orientation.t)=?,
30+
~transparent: bool=?,
31+
~visible: bool=?,
32+
~children: React.element=?
33+
) =>
34+
React.element =
35+
"Modal";

0 commit comments

Comments
 (0)