File tree Expand file tree Collapse file tree 5 files changed +14
-15
lines changed
cli/src/templates/packages
react-navigation/navigation Expand file tree Collapse file tree 5 files changed +14
-15
lines changed Original file line number Diff line number Diff line change
1
+ ---
2
+ ' create-expo-stack ' : patch
3
+ ---
4
+
5
+ adjustments the nwui template
Original file line number Diff line number Diff line change @@ -12,7 +12,7 @@ import { StatusBar } from 'expo-status-bar';
12
12
< % if (props .stylingPackage ? .options .selectedComponents .includes (' bottom-sheet' )) { % >
13
13
import { GestureHandlerRootView } from ' react-native-gesture-handler' ;
14
14
< % } % >
15
-
15
+ import { ComponentProps } from ' react ' ;
16
16
import { ThemeToggle } from ' ~/components/ThemeToggle' ;
17
17
import { useColorScheme , useInitialAndroidBarSync } from ' ~/lib/useColorScheme' ;
18
18
import { NAV_THEME } from ' ~/theme' ;
@@ -61,15 +61,15 @@ export default function RootLayout() {
61
61
62
62
const SCREEN_OPTIONS = {
63
63
animation: ' ios_from_right' , // for android
64
- } as const ;
64
+ } satisfies ComponentProps < typeof Stack > [ ' screenOptions ' ] ;
65
65
66
66
const DRAWER_OPTIONS = {
67
67
headerShown: false ,
68
- } as const ;
68
+ } satisfies ComponentProps < typeof Stack . Screen > [ ' options ' ] ;
69
69
70
70
const MODAL_OPTIONS = {
71
71
presentation: ' modal' ,
72
72
animation: ' fade_from_bottom' , // for android
73
73
title: ' Settings' ,
74
74
headerRight : () => < ThemeToggle / > ,
75
- } as const ;
75
+ } satisfies ComponentProps < typeof Stack . Screen > [ ' options ' ] ;
Original file line number Diff line number Diff line change @@ -6,10 +6,7 @@ import { TabBarIcon } from '../../components/TabBarIcon';
6
6
7
7
export default function TabLayout() {
8
8
return (
9
- <Tabs
10
- screenOptions ={{
11
- tabBarActiveTintColor: ' black' ,
12
- }} >
9
+ <Tabs >
13
10
<Tabs .Screen
14
11
name =' index'
15
12
options ={{
Original file line number Diff line number Diff line change @@ -264,8 +264,8 @@ const COMPONENTS: ComponentItem[] = [
264
264
name: ' Progress Indicator' ,
265
265
component : function ProgressIndicatorExample () {
266
266
const [progress , setProgress ] = React .useState (13 );
267
- let id: ReturnType< typeof setInterval> | null = null ;
268
267
React .useEffect (() => {
268
+ let id: ReturnType< typeof setInterval> | null = null ;
269
269
if (! id) {
270
270
id = setInterval (() => {
271
271
setProgress ((prev ) => (prev >= 99 ? 0 : prev + 5 ));
@@ -507,7 +507,7 @@ const COMPONENTS: ComponentItem[] = [
507
507
title= ' Open Bottom Sheet'
508
508
onPress= {() => bottomSheetModalRef .current ? .present ()}
509
509
/ >
510
- < Sheet ref= {bottomSheetModalRef} snapPoints= {[200 ]}>
510
+ < Sheet ref= {bottomSheetModalRef} snapPoints= {[200 ]} enableDynamicSizing = { false } >
511
511
< View className= ' flex-1 justify-center items-center pb-8' >
512
512
< Text > @gorhom/ bottom- sheet 🎉< / Text >
513
513
< / View>
Original file line number Diff line number Diff line change @@ -5,16 +5,13 @@ import One from '../screens/one';
5
5
import Two from '../screens/two';
6
6
7
7
const Tab = createBottomTabNavigator({
8
+ <% if (props .navigationPackage ? .options .type === ' drawer + tabs' ) { % >
8
9
screenOptions : function ScreenOptions () {
9
10
return {
10
- <% if (props .stylingPackage ? .name !== " unistyles" ) { % >
11
- tabBarActiveTintColor: ' black' ,
12
- < % } % >
13
- < % if (props .navigationPackage ? .options .type === ' drawer + tabs' ) { % >
14
11
headerShown: false ,
15
- < % } % >
16
12
}
17
13
},
14
+ < % } % >
18
15
screens: {
19
16
One: {
20
17
screen : One,
You can’t perform that action at this time.
0 commit comments