create-expo-stack 2.7.0-next.0c1b767 → 2.7.0-next.327ab2a
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/build/templates/base/package.json.ejs +0 -2
- package/build/templates/packages/nativewindui/app/index.tsx.ejs +2 -2
- package/build/templates/packages/nativewindui/lib/useHeaderSearchBar.tsx.ejs +1 -1
- package/package.json +1 -1
- package/build/templates/packages/nativewindui/app/bottom-tabs/_layout.tsx.ejs +0 -34
- package/build/templates/packages/nativewindui/app/bottom-tabs/index.tsx.ejs +0 -11
- package/build/templates/packages/nativewindui/app/bottom-tabs/profile.tsx.ejs +0 -11
- package/build/templates/packages/nativewindui/app/drawer/_layout.tsx.ejs +0 -29
- package/build/templates/packages/nativewindui/app/drawer/index.tsx.ejs +0 -11
- package/build/templates/packages/nativewindui/app/top-tabs/_layout.tsx.ejs +0 -71
- package/build/templates/packages/nativewindui/app/top-tabs/following.tsx.ejs +0 -13
- package/build/templates/packages/nativewindui/app/top-tabs/index.tsx.ejs +0 -13
- package/build/templates/packages/nativewindui/app/top-tabs/my-group.tsx.ejs +0 -13
|
@@ -20,7 +20,6 @@
|
|
|
20
20
|
"nativewind": "^4.0.1",
|
|
21
21
|
<% } %>
|
|
22
22
|
<% if (props.stylingPackage?.name === "nativewindui") { %>
|
|
23
|
-
"@react-navigation/material-top-tabs": "^6.6.13",
|
|
24
23
|
"@roninoss/icons": "^0.0.3",
|
|
25
24
|
"@shopify/flash-list": "1.6.3",
|
|
26
25
|
"class-variance-authority": "^0.7.0",
|
|
@@ -29,7 +28,6 @@
|
|
|
29
28
|
"tailwind-merge": "^2.2.1",
|
|
30
29
|
"react-native-uitextview": "^1.1.4",
|
|
31
30
|
"react-native-pager-view": "6.2.3",
|
|
32
|
-
"react-native-tab-view": "^3.5.2",
|
|
33
31
|
<% } %>
|
|
34
32
|
|
|
35
33
|
<% if (props.stylingPackage?.name === "restyle") { %>
|
|
@@ -50,9 +50,9 @@ function ListEmptyComponent() {
|
|
|
50
50
|
return (
|
|
51
51
|
<>
|
|
52
52
|
{Platform.OS === 'ios' && <View style={{ height: headerHeight + SEARCH_BAR_HEIGHT }} />}
|
|
53
|
-
<View className="flex-1 items-center justify-center px-
|
|
53
|
+
<View className="flex-1 items-center justify-center px-8">
|
|
54
54
|
<Text variant="title3" className="pb-1 text-center font-bold">
|
|
55
|
-
|
|
55
|
+
No Components Installed
|
|
56
56
|
</Text>
|
|
57
57
|
<Text color="tertiary" variant="body" className="pb-4 text-center">
|
|
58
58
|
You can install any of the free components from the NativeWindUI website.
|
|
@@ -18,7 +18,7 @@ export function useHeaderSearchBar(props: SearchBarProps = {}) {
|
|
|
18
18
|
tintColor: colors.primary,
|
|
19
19
|
headerIconColor: colors.foreground,
|
|
20
20
|
hintTextColor: colors.grey,
|
|
21
|
-
hideWhenScrolling:
|
|
21
|
+
hideWhenScrolling: true,
|
|
22
22
|
onChangeText(ev) {
|
|
23
23
|
setSearch(ev.nativeEvent.text);
|
|
24
24
|
},
|
package/package.json
CHANGED
|
@@ -1,34 +0,0 @@
|
|
|
1
|
-
import { ThemeToggle } from '~/components/ThemeToggle';
|
|
2
|
-
import { Icon } from '@roninoss/icons';
|
|
3
|
-
import { Tabs } from 'expo-router';
|
|
4
|
-
import { View } from 'react-native';
|
|
5
|
-
|
|
6
|
-
export default function TabsLayout() {
|
|
7
|
-
return (
|
|
8
|
-
<Tabs screenOptions={SCREEN_OPTIONS}>
|
|
9
|
-
<Tabs.Screen name='index' options={INDEX_OPTIONS} />
|
|
10
|
-
<Tabs.Screen name='profile' options={PROFILE_OPTIONS} />
|
|
11
|
-
</Tabs>
|
|
12
|
-
);
|
|
13
|
-
}
|
|
14
|
-
const SCREEN_OPTIONS = {
|
|
15
|
-
headerRight: () => (
|
|
16
|
-
<View className='px-4'>
|
|
17
|
-
<ThemeToggle />
|
|
18
|
-
</View>
|
|
19
|
-
),
|
|
20
|
-
};
|
|
21
|
-
|
|
22
|
-
const INDEX_OPTIONS = {
|
|
23
|
-
title: 'Home',
|
|
24
|
-
tabBarIcon({ color, size }: { color: string; size: number }) {
|
|
25
|
-
return <Icon name='home' color={color} size={size} />;
|
|
26
|
-
},
|
|
27
|
-
};
|
|
28
|
-
|
|
29
|
-
const PROFILE_OPTIONS = {
|
|
30
|
-
title: 'Profile',
|
|
31
|
-
tabBarIcon({ color, size }: { color: string; size: number }) {
|
|
32
|
-
return <Icon name='person' color={color} size={size} />;
|
|
33
|
-
},
|
|
34
|
-
};
|
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
import { router } from 'expo-router';
|
|
2
|
-
import * as React from 'react';
|
|
3
|
-
import { Button, View } from 'react-native';
|
|
4
|
-
|
|
5
|
-
export default function HomeScreen() {
|
|
6
|
-
return (
|
|
7
|
-
<View className='flex-1 justify-center items-center'>
|
|
8
|
-
<Button title='Go back' onPress={router.back} />
|
|
9
|
-
</View>
|
|
10
|
-
);
|
|
11
|
-
}
|
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
import { router } from 'expo-router';
|
|
2
|
-
import * as React from 'react';
|
|
3
|
-
import { Button, View } from 'react-native';
|
|
4
|
-
|
|
5
|
-
export default function ProfileScreen() {
|
|
6
|
-
return (
|
|
7
|
-
<View className='flex-1 justify-center items-center'>
|
|
8
|
-
<Button color={'orange'} title='Go to home tab' onPress={router.back} />
|
|
9
|
-
</View>
|
|
10
|
-
);
|
|
11
|
-
}
|
|
@@ -1,29 +0,0 @@
|
|
|
1
|
-
import { ThemeToggle } from '~/components/ThemeToggle';
|
|
2
|
-
import { useColorScheme } from '~/lib/useColorScheme';
|
|
3
|
-
import { Drawer } from 'expo-router/drawer';
|
|
4
|
-
import { View } from 'react-native';
|
|
5
|
-
|
|
6
|
-
export default function DrawerLayout() {
|
|
7
|
-
const { colors } = useColorScheme();
|
|
8
|
-
return (
|
|
9
|
-
<Drawer
|
|
10
|
-
screenOptions={{
|
|
11
|
-
headerTintColor: colors.foreground,
|
|
12
|
-
headerRight,
|
|
13
|
-
}}
|
|
14
|
-
>
|
|
15
|
-
<Drawer.Screen name='index' options={EXPLORE_OPTIONS} />
|
|
16
|
-
</Drawer>
|
|
17
|
-
);
|
|
18
|
-
}
|
|
19
|
-
|
|
20
|
-
function headerRight() {
|
|
21
|
-
return (
|
|
22
|
-
<View className='px-4'>
|
|
23
|
-
<ThemeToggle />
|
|
24
|
-
</View>
|
|
25
|
-
);
|
|
26
|
-
}
|
|
27
|
-
const EXPLORE_OPTIONS = {
|
|
28
|
-
title: 'Explore',
|
|
29
|
-
};
|
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
import { router } from 'expo-router';
|
|
2
|
-
import * as React from 'react';
|
|
3
|
-
import { Button, View } from 'react-native';
|
|
4
|
-
|
|
5
|
-
export default function ExploreScreen() {
|
|
6
|
-
return (
|
|
7
|
-
<View className='flex-1 justify-center items-center'>
|
|
8
|
-
<Button title='Go back' onPress={router.back} />
|
|
9
|
-
</View>
|
|
10
|
-
);
|
|
11
|
-
}
|
|
@@ -1,71 +0,0 @@
|
|
|
1
|
-
import { useColorScheme } from '~/lib/useColorScheme';
|
|
2
|
-
import type {
|
|
3
|
-
MaterialTopTabNavigationEventMap,
|
|
4
|
-
MaterialTopTabNavigationOptions,
|
|
5
|
-
} from '@react-navigation/material-top-tabs';
|
|
6
|
-
import { createMaterialTopTabNavigator } from '@react-navigation/material-top-tabs';
|
|
7
|
-
import {
|
|
8
|
-
type ParamListBase,
|
|
9
|
-
type TabNavigationState,
|
|
10
|
-
} from '@react-navigation/native';
|
|
11
|
-
import { withLayoutContext } from 'expo-router';
|
|
12
|
-
import { Dimensions } from 'react-native';
|
|
13
|
-
|
|
14
|
-
const { width } = Dimensions.get('screen');
|
|
15
|
-
|
|
16
|
-
const { Navigator } = createMaterialTopTabNavigator();
|
|
17
|
-
|
|
18
|
-
const TopTabs = withLayoutContext<
|
|
19
|
-
MaterialTopTabNavigationOptions,
|
|
20
|
-
typeof Navigator,
|
|
21
|
-
TabNavigationState<ParamListBase>,
|
|
22
|
-
MaterialTopTabNavigationEventMap
|
|
23
|
-
>(Navigator);
|
|
24
|
-
|
|
25
|
-
const SCREENS = [
|
|
26
|
-
{
|
|
27
|
-
name: 'index',
|
|
28
|
-
title: 'For You',
|
|
29
|
-
},
|
|
30
|
-
{
|
|
31
|
-
name: 'following',
|
|
32
|
-
title: 'Following',
|
|
33
|
-
},
|
|
34
|
-
{
|
|
35
|
-
name: 'my-group',
|
|
36
|
-
title: 'My Group',
|
|
37
|
-
},
|
|
38
|
-
];
|
|
39
|
-
|
|
40
|
-
export default function TopTabsLayout() {
|
|
41
|
-
const { colors } = useColorScheme();
|
|
42
|
-
return (
|
|
43
|
-
<TopTabs
|
|
44
|
-
initialRouteName='index'
|
|
45
|
-
screenOptions={{
|
|
46
|
-
tabBarActiveTintColor: colors.primary,
|
|
47
|
-
tabBarInactiveTintColor: 'grey',
|
|
48
|
-
tabBarLabelStyle: {
|
|
49
|
-
fontSize: 14,
|
|
50
|
-
textTransform: 'capitalize',
|
|
51
|
-
fontWeight: 'bold',
|
|
52
|
-
},
|
|
53
|
-
tabBarIndicatorStyle: {
|
|
54
|
-
backgroundColor: colors.primary,
|
|
55
|
-
},
|
|
56
|
-
tabBarScrollEnabled: true,
|
|
57
|
-
tabBarItemStyle: { width: width / SCREENS.length },
|
|
58
|
-
}}
|
|
59
|
-
>
|
|
60
|
-
{SCREENS.map(({ name, title }) => (
|
|
61
|
-
<TopTabs.Screen
|
|
62
|
-
key={name}
|
|
63
|
-
name={name}
|
|
64
|
-
options={{
|
|
65
|
-
title,
|
|
66
|
-
}}
|
|
67
|
-
/>
|
|
68
|
-
))}
|
|
69
|
-
</TopTabs>
|
|
70
|
-
);
|
|
71
|
-
}
|
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
import { Text } from '~/components/nativewind-ui/Text';
|
|
2
|
-
import { View } from 'react-native';
|
|
3
|
-
|
|
4
|
-
export default function FollowingScreen() {
|
|
5
|
-
return (
|
|
6
|
-
<View className='flex-1 justify-center items-center gap-5'>
|
|
7
|
-
<View className='items-center gap-1'>
|
|
8
|
-
<Text variant='title1'>Following Tab</Text>
|
|
9
|
-
<Text>Swipe to see other tabs</Text>
|
|
10
|
-
</View>
|
|
11
|
-
</View>
|
|
12
|
-
);
|
|
13
|
-
}
|
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
import { Text } from '~/components/nativewind-ui/Text';
|
|
2
|
-
import { View } from 'react-native';
|
|
3
|
-
|
|
4
|
-
export default function ForYouScreen() {
|
|
5
|
-
return (
|
|
6
|
-
<View className='flex-1 justify-center items-center gap-5'>
|
|
7
|
-
<View className='items-center gap-1'>
|
|
8
|
-
<Text variant='title1'>For You Tab</Text>
|
|
9
|
-
<Text>Swipe to see other tabs</Text>
|
|
10
|
-
</View>
|
|
11
|
-
</View>
|
|
12
|
-
);
|
|
13
|
-
}
|
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
import { View } from 'react-native';
|
|
2
|
-
import { Text } from '~/components/nativewind-ui/Text';
|
|
3
|
-
|
|
4
|
-
export default function MyGroupScreen() {
|
|
5
|
-
return (
|
|
6
|
-
<View className='flex-1 justify-center items-center gap-5'>
|
|
7
|
-
<View className='items-center gap-1'>
|
|
8
|
-
<Text variant='title1'>My Group Tab</Text>
|
|
9
|
-
<Text>Swipe to see other tabs</Text>
|
|
10
|
-
</View>
|
|
11
|
-
</View>
|
|
12
|
-
);
|
|
13
|
-
}
|