11import { useColorMode } from '@docusaurus/theme-common' ;
2+ import { usePluginData } from '@docusaurus/useGlobalData' ;
23import MDXPre from '@theme-original/MDXComponents/Pre' ;
34import React from 'react' ;
45
5- const peers = {
6- 'react-native-safe-area-context' : '*' ,
7- 'react-native-screens' : '*' ,
8- } ;
9-
10- const versions = {
11- 7 : {
12- '@react-navigation/bottom-tabs' : [
13- '7.0.0-rc.20' ,
14- {
15- ...peers ,
16- '@react-navigation/native' : '*' ,
17- } ,
18- ] ,
19- '@react-navigation/core' : '7.0.0-rc.10' ,
20- '@react-navigation/native' : '7.0.0-rc.13' ,
21- '@react-navigation/drawer' : [
22- '7.0.0-rc.18' ,
23- {
24- ...peers ,
25- '@react-navigation/native' : '*' ,
26- 'react-native-gesture-handler' : '*' ,
27- 'react-native-reanimated' : '*' ,
28- } ,
29- ] ,
30- '@react-navigation/elements' : [
31- '2.0.0-rc.14' ,
32- {
33- ...peers ,
34- '@react-navigation/native' : '*' ,
35- } ,
36- ] ,
37- '@react-navigation/material-top-tabs' : [
38- '7.0.0-rc.14' ,
39- {
40- ...peers ,
41- '@react-navigation/native' : '*' ,
42- 'react-native-pager-view' : '*' ,
43- } ,
44- ] ,
45- '@react-navigation/native-stack' : [
46- '7.0.0-rc.15' ,
47- {
48- ...peers ,
49- '@react-navigation/native' : '*' ,
50- } ,
51- ] ,
52- '@react-navigation/routers' : '7.0.0-rc.6' ,
53- '@react-navigation/stack' : [
54- '7.0.0-rc.15' ,
55- {
56- ...peers ,
57- '@react-navigation/native' : '*' ,
58- 'react-native-gesture-handler' : '*' ,
59- } ,
60- ] ,
61- 'react-native-drawer-layout' : [
62- '4.0.0-rc.7' ,
63- {
64- 'react-native-gesture-handler' : '*' ,
65- 'react-native-reanimated' : '*' ,
66- } ,
67- ] ,
68- 'react-native-tab-view' : [
69- '4.0.0-rc.7' ,
70- {
71- 'react-native-pager-view' : '*' ,
72- } ,
73- ] ,
74- } ,
75- } ;
76-
776export default function Pre ( {
787 children,
798 'data-name' : name ,
@@ -84,6 +13,8 @@ export default function Pre({
8413 ...rest
8514} ) {
8615 const { colorMode } = useColorMode ( ) ;
16+ const { versions } = usePluginData ( 'react-navigation-versions' ) ;
17+
8718 const child = React . Children . only ( children ) ;
8819
8920 // Handle diffs with language
0 commit comments