File tree Expand file tree Collapse file tree 7 files changed +73
-11
lines changed Expand file tree Collapse file tree 7 files changed +73
-11
lines changed Original file line number Diff line number Diff line change @@ -13,7 +13,8 @@ const resolvers = {
13
13
"@react-navigation/native" : "../node_modules" ,
14
14
"@react-navigation/stack" : "../node_modules" ,
15
15
"@react-navigation/routers" : "../node_modules" ,
16
- "@react-navigation/bottom-tabs" : "../node_modules"
16
+ "@react-navigation/bottom-tabs" : "../node_modules" ,
17
+ "@react-navigation/material-top-tabs" : "../node_modules"
17
18
} ;
18
19
19
20
module . exports = {
Original file line number Diff line number Diff line change 12
12
"@react-navigation/native" : " link:../node_modules/@react-navigation/native" ,
13
13
"@react-navigation/stack" : " link:../node_modules/@react-navigation/stack" ,
14
14
"@react-navigation/bottom-tabs" : " link:../node_modules/@react-navigation/bottom-tabs" ,
15
+ "@react-navigation/material-top-tabs" : " link:../node_modules/@react-navigation/material-top-tabs" ,
15
16
"expo" : " ~37.0.3" ,
16
17
"expo-updates" : " ~0.1.0" ,
17
18
"react" : " ~16.9.0" ,
Original file line number Diff line number Diff line change @@ -14,6 +14,7 @@ import ForwardOnly from "./tests/ForwardOnly";
14
14
import ForwardOnlyV4 from "./tests/ForwardOnly.v4" ;
15
15
import ListView from "./tests/ListView" ;
16
16
import ListViewV4 from "./tests/ListView.v4" ;
17
+ import MaterialTopTabs from "./tests/MaterialTopTabs" ;
17
18
import MaterialTopTabsV4 from "./tests/MaterialTopTabs.v4" ;
18
19
import ModalIOS13PageSheet from "./tests/ModalIOS13PageSheet" ;
19
20
import ModalIOS13PageSheetV4 from "./tests/ModalIOS13PageSheet.v4" ;
@@ -75,7 +76,11 @@ export default () => (
75
76
ComponentV4 = { BottomTabs2V4 }
76
77
Component = { BottomTabs2 }
77
78
/>
78
- < Test title = "MaterialTopTabs" ComponentV4 = { MaterialTopTabsV4 } />
79
+ < Test
80
+ title = "MaterialTopTabs"
81
+ ComponentV4 = { MaterialTopTabsV4 }
82
+ Component = { MaterialTopTabs }
83
+ />
79
84
< Test title = "ListView" ComponentV4 = { ListViewV4 } Component = { ListView } />
80
85
< Test title = "ViewPager" ComponentV4 = { ViewPagerV4 } Component = { ViewPager } />
81
86
< Test title = "TextInput" ComponentV4 = { TextInputStackV4 } />
Original file line number Diff line number Diff line change
1
+ import { createMaterialTopTabNavigator } from "@react-navigation/material-top-tabs" ;
2
+ import { NavigationContainer } from "@react-navigation/native" ;
3
+ import * as React from "react" ;
4
+ import { createSharedElementStackNavigator } from "react-navigation-shared-element" ;
5
+
6
+ import { MasterScreen , DetailScreen } from "../screens" ;
7
+
8
+ const name = "MaterialTopTabs" ;
9
+
10
+ const MaterialTopTab = createMaterialTopTabNavigator ( ) ;
11
+
12
+ const Stack1 = createSharedElementStackNavigator ( {
13
+ name,
14
+ debug : true
15
+ } ) ;
16
+
17
+ const Stack2 = createSharedElementStackNavigator ( {
18
+ name,
19
+ debug : true
20
+ } ) ;
21
+
22
+ const Stack1Screen = ( ) => (
23
+ < Stack1 . Navigator >
24
+ < Stack1 . Screen name = { name } component = { MasterScreen } />
25
+ < Stack1 . Screen name = "Detail" component = { DetailScreen } />
26
+ </ Stack1 . Navigator >
27
+ ) ;
28
+
29
+ const Stack2Screen = ( ) => (
30
+ < Stack2 . Navigator >
31
+ < Stack2 . Screen name = { name } component = { MasterScreen } />
32
+ < Stack2 . Screen name = "Detail" component = { DetailScreen } />
33
+ </ Stack2 . Navigator >
34
+ ) ;
35
+
36
+ export default ( ) => (
37
+ < NavigationContainer >
38
+ < MaterialTopTab . Navigator >
39
+ < MaterialTopTab . Screen name = "Tab1" component = { Stack1Screen } />
40
+ < MaterialTopTab . Screen name = "Tab2" component = { Stack2Screen } />
41
+ </ MaterialTopTab . Navigator >
42
+ </ NavigationContainer >
43
+ ) ;
Original file line number Diff line number Diff line change 1253
1253
query-string "^6.11.1"
1254
1254
react-is "^16.13.0"
1255
1255
1256
- " @react-navigation/core@^5.3.4 " :
1257
- version "5.3.4 "
1258
- resolved "https://registry.yarnpkg.com/@react-navigation/core/-/core-5.3.4. tgz#272eb48381c4db251f4dc5cd044db1606a551551 "
1259
- integrity sha512-ul8J7oHC1/k/qWORr7uI710nKofbcD2clYI0bK0Bix+xgAoiFPgrwRDrQcjWw4YQViYlR8CGF/DhnKK+BFA+Yw ==
1256
+ " @react-navigation/core@^5.4.0 " :
1257
+ version "5.4.0 "
1258
+ resolved "https://registry.yarnpkg.com/@react-navigation/core/-/core-5.4.0. tgz#6b4973d48396d28ed3efee582b28807682a5865d "
1259
+ integrity sha512-tDmfw7nzbJg186cXHUPl/VYEGSepzBXNiHRv4GTxLQ+S9cnZgPyrGv56kiSvHhxCzyNGN0nHscCY9IUv08KL6Q ==
1260
1260
dependencies :
1261
- " @react-navigation/routers" " ^5.4.0 "
1261
+ " @react-navigation/routers" " ^5.4.2 "
1262
1262
escape-string-regexp "^2.0.0"
1263
1263
nanoid "^3.0.2"
1264
1264
query-string "^6.12.0"
1265
1265
react-is "^16.13.0"
1266
1266
use-subscription "^1.4.0"
1267
1267
1268
+ " @react-navigation/material-top-tabs@link:../node_modules/@react-navigation/material-top-tabs " :
1269
+ version "0.0.0"
1270
+ uid ""
1271
+
1268
1272
" @react-navigation/native@^3.7.11 " :
1269
1273
version "3.7.11"
1270
1274
resolved "https://registry.yarnpkg.com/@react-navigation/native/-/native-3.7.11.tgz#00aa5d8187b346b16a5d2e9d1e32413c78bc4ad4"
1277
1281
version "0.0.0"
1278
1282
uid ""
1279
1283
1280
- " @react-navigation/routers@^5.4.0 " :
1281
- version "5.4.0 "
1282
- resolved "https://registry.yarnpkg.com/@react-navigation/routers/-/routers-5.4.0 .tgz#2fce2a3880e84a110d4eaea317bb7dadee27d57c "
1283
- integrity sha512-Z5mQF/oQH9CRLilNm1H7h0wjY3dKomWOhuuDehW8UKuLiFp2mWJI1P5N9qwaSraxhcoiVfb9QXwKZru/wBzWMQ ==
1284
+ " @react-navigation/routers@^5.4.2 " :
1285
+ version "5.4.2 "
1286
+ resolved "https://registry.yarnpkg.com/@react-navigation/routers/-/routers-5.4.2 .tgz#10c1f32b0ddde935d1fc9123fb1683472bf31815 "
1287
+ integrity sha512-YjGv4H0LXD2YnDjSBAJzIKzlZehFRqWfR2IJtZor/mfLkOi6qDl8yJeqZKbLEeQsu6o6493QdxM81tqX293kyQ ==
1284
1288
dependencies :
1285
1289
nanoid "^3.0.2"
1286
1290
Original file line number Diff line number Diff line change 44
44
"devDependencies" : {
45
45
"@commitlint/config-conventional" : " ^8.3.4" ,
46
46
"@react-navigation/bottom-tabs" : " ^5.3.3" ,
47
+ "@react-navigation/material-top-tabs" : " ^5.1.14" ,
47
48
"@react-navigation/native" : " ^5.2.3" ,
48
49
"@react-navigation/stack" : " ^5.2.18" ,
49
50
"@types/react" : " ^16.9.23" ,
Original file line number Diff line number Diff line change 1246
1246
react-is "^16.13.0"
1247
1247
use-subscription "^1.4.0"
1248
1248
1249
+ " @react-navigation/material-top-tabs@^5.1.14 " :
1250
+ version "5.1.14"
1251
+ resolved "https://registry.yarnpkg.com/@react-navigation/material-top-tabs/-/material-top-tabs-5.1.14.tgz#cb4993b7db70dc9f7028d0e71255ef98dc07f22a"
1252
+ integrity sha512-IcdfWzAGWQq7xHJbsnFBNO9iHslZbGjZ1CPbWiVpFAKkfW/Vwv2P3qS9He6rQDghv0X8Uqd8aS0braTI/AfL+g==
1253
+ dependencies :
1254
+ color "^3.1.2"
1255
+
1249
1256
" @react-navigation/native@^3.7.11 " :
1250
1257
version "3.7.11"
1251
1258
resolved "https://registry.yarnpkg.com/@react-navigation/native/-/native-3.7.11.tgz#00aa5d8187b346b16a5d2e9d1e32413c78bc4ad4"
You can’t perform that action at this time.
0 commit comments