Skip to content

Commit 45faa70

Browse files
committed
linking config for NavigationContainer
1 parent db66ce4 commit 45faa70

File tree

2 files changed

+20
-0
lines changed

2 files changed

+20
-0
lines changed

src/Native.bs.js

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,8 @@
11
'use strict';
22

33

4+
var Linking = {};
5+
46
var NavigationContainer = {};
57

68
var ServerContainer = {};
@@ -9,6 +11,7 @@ var CommonActions = {};
911

1012
var Link = {};
1113

14+
exports.Linking = Linking;
1215
exports.NavigationContainer = NavigationContainer;
1316
exports.ServerContainer = ServerContainer;
1417
exports.CommonActions = CommonActions;

src/Native.res

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,22 @@ external darkTheme: theme = "DarkTheme"
1919
@module("@react-navigation/native")
2020
external useTheme: unit => theme = "useTheme"
2121

22+
module Linking = {
23+
type rec config = {
24+
path?: string,
25+
exact?: bool,
26+
initialRouteName?: string,
27+
screens?: screens,
28+
}
29+
and screens = dict<config>
30+
31+
type t = {
32+
enabled?: bool,
33+
prefixes: array<string>,
34+
config?: config,
35+
}
36+
}
37+
2238
module NavigationContainer = {
2339
type state = Js.Json.t
2440
type navigationState = state => unit
@@ -30,6 +46,7 @@ module NavigationContainer = {
3046
~onStateChange: navigationState=?,
3147
~onReady: unit => unit=?,
3248
~theme: theme=?,
49+
~linking: Linking.t=?,
3350
~children: React.element,
3451
~independent: bool=?,
3552
) => React.element = "NavigationContainer"

0 commit comments

Comments
 (0)