1
- ## How to use this template
2
-
3
- - ⚠️ ** Don't fork this repository.** Use the "Use this template" green GitHub
4
- button.
5
- - Put your bindings in ` src/ReactNativeXxxxxxxxxx ` & rename accordingly or use
6
- ` rescript.json ` ` "namespace" ` field (more on this below),
7
- - Update all occurences of
8
-
9
- - ` @rescript-react-native/__template__ `
10
- - ` https://github.com/rescript-react-native/__template__ `
11
- - ` __template__ `
12
- - ` react-native-XXXXXXXXXX `
13
- - ` https://github.com/OWNER/react-native-XXXXXXXXXX `
14
- - ` ReactNativeXxxxxxxxxx ` . If you have more than a file exposed, you should
15
- consider using ReScript custom namespace by adjusting ` rescript.json `
16
- and adding a ` "namespace": "react-native-something" ` (note that it will be
17
- converted to ` ReactNativeXxxxxxxxxx ` )
18
-
19
- - Add your ` react-native-XXXXXXXXXX ` (adjusted) in ` peerDependencies `
20
- & ` devDependencies ` section
21
- - Adjust the changelog (and/or clean it)
22
- - Remove this part ⬆ & keep everything below ⬇
1
+ # ` @rescript-react-native/edge-to-edge `
23
2
24
- ---
25
-
26
- # ` @rescript-react-native/__template__ `
27
-
28
- [ ![ Build Status] ( https://github.com/rescript-react-native/__template__/workflows/Build/badge.svg )] ( https://github.com/rescript-react-native/__template__/actions )
29
- [ ![ Version] ( https://img.shields.io/npm/v/@rescript-react-native/__template__.svg )] ( https://www.npmjs.com/@rescript-react-native/__template__ )
3
+ [ ![ Build Status] ( https://github.com/rescript-react-native/edge-to-edge/workflows/Build/badge.svg )] ( https://github.com/rescript-react-native/edge-to-edge/actions )
4
+ [ ![ Version] ( https://img.shields.io/npm/v/@rescript-react-native/edge-to-edge.svg )] ( https://www.npmjs.com/@rescript-react-native/edge-to-edge )
30
5
[ ![ ReScript Forum] ( https://img.shields.io/discourse/posts?color=e6484f&label=ReScript%20Forum&server=https%3A%2F%2Fforum.rescript-lang.org )] ( https://forum.rescript-lang.org/ )
31
6
32
7
[ ReScript] ( https://rescript-lang.org ) bindings for
33
- [ ` react-native-XXXXXXXXXX ` ] ( https://github.com/OWNER /react-native-XXXXXXXXXX ) .
8
+ [ ` react-native-edge-to-edge ` ] ( https://github.com/zoontek /react-native-edge-to-edge ) .
34
9
35
- Exposed as ` ReactNativeXxxxxxxxxx ` module.
10
+ Exposed as ` ReactNativeEdgeToEdge ` module.
36
11
37
- ` @rescript-react-native/__template__ ` X.y.\* means it's compatible with
38
- ` react-native-XXXXXXXXXX ` X.y.\*
12
+ ` @rescript-react-native/edge-to-edge ` X.y.\* means it's compatible with
13
+ ` react-native-edge-to-edge ` X.y.\*
39
14
40
15
## Installation
41
16
42
17
When
43
- [ ` react-native-XXXXXXXXXX ` ] ( https://github.com/OWNER /react-native-XXXXXXXXXX )
18
+ [ ` react-native-edge-to-edge ` ] ( https://github.com/zoontek /react-native-edge-to-edge )
44
19
is properly installed & configured by following their installation instructions,
45
20
you can install the bindings:
46
21
47
22
``` console
48
- npm install @rescript-react-native/__template__
23
+ npm install @rescript-react-native/edge-to-edge
49
24
# or
50
- yarn add @rescript-react-native/__template__
25
+ yarn add @rescript-react-native/edge-to-edge
51
26
```
52
27
53
- ` @rescript-react-native/__template__ ` should be added to ` bs-dependencies ` in your
28
+ ` @rescript-react-native/edge-to-edge ` should be added to ` bs-dependencies ` in your
54
29
` rescript.json ` :
55
30
56
31
``` diff
@@ -60,25 +35,68 @@ yarn add @rescript-react-native/__template__
60
35
"@rescript/react",
61
36
"rescript-react-native",
62
37
// ...
63
- + "@rescript-react-native/__template__ "
38
+ + "@rescript-react-native/edge-to-edge "
64
39
],
65
40
//...
66
41
}
67
42
```
68
43
69
44
## Usage
70
45
71
- ### Types
46
+ ### Component
72
47
73
- #### ` ReactNativeXxxxxxxxxx.t `
48
+ #### ` ReactNativeEdgeToEdge.SystemBars `
49
+
50
+ ``` rescript
51
+ open ReactNativeEdgeToEdge
52
+
53
+ <SystemBars
54
+ style={{
55
+ statusBar: #light,
56
+ navigationBar: #light,
57
+ }}
58
+ hidden={{
59
+ statusBar: false,
60
+ navigationBar: false,
61
+ }}
62
+ />
63
+ ```
74
64
75
65
...
76
66
77
67
### Methods
78
68
79
- #### ` ReactNativeXxxxxxxxxx.method `
69
+ #### ` ReactNativeEdgeToEdge.SystemBars.pushStackEntry `
80
70
81
- ...
71
+ ``` rescript
72
+ open ReactNativeEdgeToEdge
73
+
74
+ SystemBars.pushStackEntry(props)
75
+ ```
76
+
77
+ #### ` ReactNativeEdgeToEdge.SystemBars.popStackEntry `
78
+
79
+ ``` rescript
80
+ open ReactNativeEdgeToEdge
81
+
82
+ SystemBars.popStackEntry(props)
83
+ ```
84
+
85
+ #### ` ReactNativeEdgeToEdge.SystemBars.popStackEntry `
86
+
87
+ ``` rescript
88
+ open ReactNativeEdgeToEdge
89
+
90
+ SystemBars.popStackEntry(entry)
91
+ ```
92
+
93
+ #### ` ReactNativeEdgeToEdge.SystemBars.replaceStackEntry `
94
+
95
+ ``` rescript
96
+ open ReactNativeEdgeToEdge
97
+
98
+ SystemBars.replaceStackEntry(entry, props)
99
+ ```
82
100
83
101
---
84
102
0 commit comments