File tree Expand file tree Collapse file tree 5 files changed +15
-15
lines changed
cli/src/templates/packages
react-navigation/navigation Expand file tree Collapse file tree 5 files changed +15
-15
lines changed Original file line number Diff line number Diff line change 1+ ---
2+ ' create-expo-stack ' : patch
3+ ' rn-new ' : patch
4+ ---
5+
6+ adjustments the nwui template
Original file line number Diff line number Diff line change @@ -12,7 +12,7 @@ import { StatusBar } from 'expo-status-bar';
1212< % if (props .stylingPackage ? .options .selectedComponents .includes (' bottom-sheet' )) { % >
1313import { GestureHandlerRootView } from ' react-native-gesture-handler' ;
1414< % } % >
15-
15+ import { ComponentProps } from ' react ' ;
1616import { ThemeToggle } from ' ~/components/ThemeToggle' ;
1717import { useColorScheme , useInitialAndroidBarSync } from ' ~/lib/useColorScheme' ;
1818import { NAV_THEME } from ' ~/theme' ;
@@ -61,15 +61,15 @@ export default function RootLayout() {
6161
6262const SCREEN_OPTIONS = {
6363 animation: ' ios_from_right' , // for android
64- } as const ;
64+ } satisfies ComponentProps < typeof Stack > [ ' screenOptions ' ] ;
6565
6666const DRAWER_OPTIONS = {
6767 headerShown: false ,
68- } as const ;
68+ } satisfies ComponentProps < typeof Stack . Screen > [ ' options ' ] ;
6969
7070const MODAL_OPTIONS = {
7171 presentation: ' modal' ,
7272 animation: ' fade_from_bottom' , // for android
7373 title: ' Settings' ,
7474 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';
66
77export default function TabLayout() {
88 return (
9- <Tabs
10- screenOptions ={{
11- tabBarActiveTintColor: ' black' ,
12- }} >
9+ <Tabs >
1310 <Tabs .Screen
1411 name =' index'
1512 options ={{
Original file line number Diff line number Diff line change @@ -264,8 +264,8 @@ const COMPONENTS: ComponentItem[] = [
264264 name: ' Progress Indicator' ,
265265 component : function ProgressIndicatorExample () {
266266 const [progress , setProgress ] = React .useState (13 );
267- let id: ReturnType< typeof setInterval> | null = null ;
268267 React .useEffect (() => {
268+ let id: ReturnType< typeof setInterval> | null = null ;
269269 if (! id) {
270270 id = setInterval (() => {
271271 setProgress ((prev ) => (prev >= 99 ? 0 : prev + 5 ));
@@ -507,7 +507,7 @@ const COMPONENTS: ComponentItem[] = [
507507 title= ' Open Bottom Sheet'
508508 onPress= {() => bottomSheetModalRef .current ? .present ()}
509509 / >
510- < Sheet ref= {bottomSheetModalRef} snapPoints= {[200 ]}>
510+ < Sheet ref= {bottomSheetModalRef} snapPoints= {[200 ]} enableDynamicSizing = { false } >
511511 < View className= ' flex-1 justify-center items-center pb-8' >
512512 < Text > @gorhom/ bottom- sheet 🎉< / Text >
513513 < / View>
Original file line number Diff line number Diff line change @@ -5,16 +5,13 @@ import One from '../screens/one';
55import Two from '../screens/two';
66
77const Tab = createBottomTabNavigator({
8+ <% if (props .navigationPackage ? .options .type === ' drawer + tabs' ) { % >
89 screenOptions : function ScreenOptions () {
910 return {
10- <% if (props .stylingPackage ? .name !== " unistyles" ) { % >
11- tabBarActiveTintColor: ' black' ,
12- < % } % >
13- < % if (props .navigationPackage ? .options .type === ' drawer + tabs' ) { % >
1411 headerShown: false ,
15- < % } % >
1612 }
1713 },
14+ < % } % >
1815 screens: {
1916 One: {
2017 screen : One,
You can’t perform that action at this time.
0 commit comments