Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions .changeset/loose-hotels-pump.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
---
'create-expo-stack': patch
'rn-new': patch
---

adjustments the nwui template
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ import { StatusBar } from 'expo-status-bar';
<% if (props.stylingPackage?.options.selectedComponents.includes('bottom-sheet')) { %>
import { GestureHandlerRootView } from 'react-native-gesture-handler';
<% } %>

import { ComponentProps } from 'react';
import { ThemeToggle } from '~/components/ThemeToggle';
import { useColorScheme, useInitialAndroidBarSync } from '~/lib/useColorScheme';
import { NAV_THEME } from '~/theme';
Expand Down Expand Up @@ -61,15 +61,15 @@ export default function RootLayout() {

const SCREEN_OPTIONS = {
animation: 'ios_from_right', // for android
} as const;
} satisfies ComponentProps<typeof Stack>['screenOptions'];

const DRAWER_OPTIONS = {
headerShown: false,
} as const;
} satisfies ComponentProps<typeof Stack.Screen>['options'];

const MODAL_OPTIONS = {
presentation: 'modal',
animation: 'fade_from_bottom', // for android
title: 'Settings',
headerRight: () => <ThemeToggle />,
} as const;
} satisfies ComponentProps<typeof Stack.Screen>['options'];
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,7 @@ import { TabBarIcon } from '../../components/TabBarIcon';

export default function TabLayout() {
return (
<Tabs
screenOptions={{
tabBarActiveTintColor: 'black',
}}>
<Tabs>
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this was causing the icon to be barely visible in dark mode

<Tabs.Screen
name='index'
options={{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -264,8 +264,8 @@ const COMPONENTS: ComponentItem[] = [
name: 'Progress Indicator',
component: function ProgressIndicatorExample() {
const [progress, setProgress] = React.useState(13);
let id: ReturnType<typeof setInterval> | null = null;
React.useEffect(() => {
let id: ReturnType<typeof setInterval> | null = null;
if (!id) {
id = setInterval(() => {
setProgress((prev) => (prev >= 99 ? 0 : prev + 5));
Expand Down Expand Up @@ -507,7 +507,7 @@ const COMPONENTS: ComponentItem[] = [
title='Open Bottom Sheet'
onPress={() => bottomSheetModalRef.current?.present()}
/>
<Sheet ref={bottomSheetModalRef} snapPoints={[200]}>
<Sheet ref={bottomSheetModalRef} snapPoints={[200]} enableDynamicSizing={false}>
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

fixes bottom sheet not opening

<View className='flex-1 justify-center items-center pb-8'>
<Text>@gorhom/bottom-sheet 🎉</Text>
</View>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,16 +5,13 @@ import One from '../screens/one';
import Two from '../screens/two';

const Tab = createBottomTabNavigator({
<% if (props.navigationPackage?.options.type === 'drawer + tabs') { %>
screenOptions: function ScreenOptions() {
return {
<% if (props.stylingPackage?.name !== "unistyles") { %>
tabBarActiveTintColor: 'black',
<% } %>
<% if (props.navigationPackage?.options.type === 'drawer + tabs') { %>
headerShown: false,
<% } %>
}
},
<% } %>
screens: {
One: {
screen: One,
Expand Down