create-expo-stack 2.3.15 → 2.4.0-next.2c00bdf

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.
Files changed (53) hide show
  1. package/README.md +8 -1
  2. package/build/commands/create-expo-stack.js +52 -17
  3. package/build/templates/base/App.tsx.ejs +34 -0
  4. package/build/templates/base/babel.config.js.ejs +1 -1
  5. package/build/templates/base/package.json.ejs +11 -1
  6. package/build/templates/packages/expo-router/drawer/app/(drawer)/(tabs)/_layout.tsx.ejs +41 -0
  7. package/build/templates/packages/expo-router/drawer/app/(drawer)/(tabs)/index.tsx.ejs +88 -0
  8. package/build/templates/packages/expo-router/drawer/app/(drawer)/(tabs)/two.tsx.ejs +88 -0
  9. package/build/templates/packages/expo-router/drawer/app/(drawer)/_layout.tsx.ejs +43 -19
  10. package/build/templates/packages/expo-router/drawer/app/(drawer)/index.tsx.ejs +24 -2
  11. package/build/templates/packages/expo-router/drawer/app/[...unmatched].tsx.ejs +51 -0
  12. package/build/templates/packages/expo-router/drawer/app/_layout.tsx.ejs +43 -29
  13. package/build/templates/packages/expo-router/drawer/app/modal.tsx.ejs +96 -0
  14. package/build/templates/packages/expo-router/drawer/components/edit-screen-info.tsx.ejs +153 -0
  15. package/build/templates/packages/expo-router/stack/app/[...unmatched].tsx.ejs +53 -0
  16. package/build/templates/packages/expo-router/stack/app/_layout.tsx.ejs +13 -3
  17. package/build/templates/packages/expo-router/stack/app/details.tsx.ejs +69 -1
  18. package/build/templates/packages/expo-router/stack/app/index.tsx.ejs +87 -2
  19. package/build/templates/packages/expo-router/tabs/app/(tabs)/_layout.tsx.ejs +30 -8
  20. package/build/templates/packages/expo-router/tabs/app/(tabs)/index.tsx.ejs +25 -1
  21. package/build/templates/packages/expo-router/tabs/app/(tabs)/two.tsx.ejs +24 -1
  22. package/build/templates/packages/expo-router/tabs/app/[...unmatched].tsx.ejs +53 -0
  23. package/build/templates/packages/expo-router/tabs/app/_layout.tsx.ejs +12 -0
  24. package/build/templates/packages/expo-router/tabs/app/modal.tsx.ejs +27 -1
  25. package/build/templates/packages/expo-router/tabs/components/edit-screen-info.tsx.ejs +52 -1
  26. package/build/templates/packages/react-navigation/App.tsx.ejs +14 -1
  27. package/build/templates/packages/react-navigation/components/edit-screen-info.tsx.ejs +82 -1
  28. package/build/templates/packages/react-navigation/navigation/drawer-navigator.tsx.ejs +41 -6
  29. package/build/templates/packages/react-navigation/navigation/index.tsx.ejs +49 -4
  30. package/build/templates/packages/react-navigation/navigation/tab-navigator.tsx.ejs +53 -19
  31. package/build/templates/packages/react-navigation/screens/details.tsx.ejs +38 -0
  32. package/build/templates/packages/react-navigation/screens/home.tsx.ejs +83 -0
  33. package/build/templates/packages/react-navigation/screens/modal.tsx.ejs +38 -1
  34. package/build/templates/packages/react-navigation/screens/one.tsx.ejs +34 -0
  35. package/build/templates/packages/react-navigation/screens/overview.tsx.ejs +75 -1
  36. package/build/templates/packages/react-navigation/screens/two.tsx.ejs +34 -0
  37. package/build/templates/packages/restyle/theme/Box.tsx.ejs +6 -0
  38. package/build/templates/packages/restyle/theme/Text.tsx.ejs +6 -0
  39. package/build/templates/packages/restyle/theme/index.ts.ejs +6 -0
  40. package/build/templates/packages/restyle/theme/theme.ts.ejs +67 -0
  41. package/build/templates/packages/unistyles/breakpoints.ts.ejs +9 -0
  42. package/build/templates/packages/unistyles/theme.ts.ejs +76 -0
  43. package/build/templates/packages/unistyles/unistyles.ts.ejs +27 -0
  44. package/build/types/types.d.ts +2 -2
  45. package/build/types/utilities/printOutput.d.ts +2 -2
  46. package/build/types.js +4 -2
  47. package/build/utilities/configureProjectFiles.js +33 -6
  48. package/build/utilities/generateProjectFiles.js +8 -2
  49. package/build/utilities/printOutput.js +14 -2
  50. package/build/utilities/runCLI.js +11 -3
  51. package/build/utilities/showHelp.js +4 -1
  52. package/package.json +66 -66
  53. package/build/templates/packages/expo-router/drawer/app/(drawer)/news.tsx.ejs +0 -62
@@ -1,6 +1,11 @@
1
1
  import React from "react";
2
2
  <% if (props.stylingPackage?.name === "nativewind") { %>
3
3
  import { Text, View } from "react-native";
4
+ <% } else if (props.stylingPackage?.name === "restyle") { %>
5
+ import { Box, Text } from 'theme';
6
+ <% } else if (props.stylingPackage?.name === "unistyles") { %>
7
+ import { createStyleSheet, useStyles } from 'react-native-unistyles'
8
+ import { Text, View } from 'react-native';
4
9
  <% } else { %>
5
10
  import { StyleSheet, Text, View } from "react-native";
6
11
  <% } %>
@@ -30,6 +35,52 @@ import React from "react";
30
35
  </View>
31
36
  );
32
37
  }
38
+ <% } else if (props.stylingPackage?.name === "restyle") { %>
39
+ export default function EditScreenInfo({ path }: { path: string }) {
40
+ return (
41
+ <Box>
42
+ <Box alignItems="center" marginHorizontal="xl_64">
43
+ <Text variant="body" lineHeight={24} textAlign="center">
44
+ Open up the code for this screen:
45
+ </Text>
46
+
47
+ <Box borderRadius="s_3" paddingHorizontal="xs_4" marginVertical="s_8">
48
+ <Text>{path}</Text>
49
+ </Box>
50
+
51
+ <Text variant="body" lineHeight={24} textAlign="center">
52
+ Change any of the text, save the file, and your app will automatically update.
53
+ </Text>
54
+ </Box>
55
+ </Box>
56
+ );
57
+ }
58
+ <% } else if (props.stylingPackage?.name === "unistyles") { %>
59
+ export default function EditScreenInfo({ path }: { path: string }) {
60
+ const { styles } = useStyles(stylesheet)
61
+ return (
62
+ <View>
63
+ <View style={styles.getStartedContainer}>
64
+ <Text
65
+ style={styles.getStartedText}>
66
+ Open up the code for this screen:
67
+ </Text>
68
+
69
+ <View
70
+ style={[styles.codeHighlightContainer, styles.homeScreenFilename]}
71
+ >
72
+ <Text>{path}</Text>
73
+ </View>
74
+
75
+ <Text
76
+ style={styles.getStartedText}
77
+ >
78
+ Change any of the text, save the file, and your app will automatically update.
79
+ </Text>
80
+ </View>
81
+ </View>
82
+ );
83
+ }
33
84
  <% } else { %>
34
85
  export default function EditScreenInfo({ path }: { path: string }) {
35
86
  return (
@@ -66,7 +117,37 @@ import React from "react";
66
117
  helpLink: "py-4",
67
118
  helpLinkText: "text-center"
68
119
  };
69
- <% } else { %>
120
+ <% } else if (props.stylingPackage?.name === "unistyles") { %>
121
+ const stylesheet = createStyleSheet({
122
+ codeHighlightContainer: {
123
+ borderRadius: 3,
124
+ paddingHorizontal: 4
125
+ },
126
+ getStartedContainer: {
127
+ alignItems: 'center',
128
+ marginHorizontal: 50
129
+ },
130
+ getStartedText: {
131
+ fontSize: 17,
132
+ lineHeight: 24,
133
+ textAlign: 'center'
134
+ },
135
+ helpContainer: {
136
+ alignItems: 'center',
137
+ marginHorizontal: 20,
138
+ marginTop: 15
139
+ },
140
+ helpLink: {
141
+ paddingVertical: 15
142
+ },
143
+ helpLinkText: {
144
+ textAlign: 'center'
145
+ },
146
+ homeScreenFilename: {
147
+ marginVertical: 7
148
+ }
149
+ });
150
+ <% } else if (props.stylingPackage?.name !== "restyle") { %>
70
151
  const styles = StyleSheet.create({
71
152
  codeHighlightContainer: {
72
153
  borderRadius: 3,
@@ -1,15 +1,50 @@
1
+ import { FontAwesome, Ionicons, MaterialIcons } from '@expo/vector-icons';
1
2
  import { createDrawerNavigator } from '@react-navigation/drawer';
3
+ import { Pressable } from 'react-native';
4
+ import { StackScreenProps } from '@react-navigation/stack';
2
5
 
3
- import One from '../screens/one';
4
- import Two from '../screens/two';
6
+ import TabNavigator from './tab-navigator';
7
+ import Home from '../screens/home';
8
+ import { RootStackParamList } from '.';
9
+
10
+ type Props = StackScreenProps<RootStackParamList, 'DrawerNavigator'>;
5
11
 
6
12
  const Drawer = createDrawerNavigator();
7
13
 
8
- export default function DrawerNavigator() {
14
+ export default function DrawerNavigator({ navigation }: Props) {
9
15
  return (
10
- <Drawer.Navigator initialRouteName="One">
11
- <Drawer.Screen name="One" component={One} />
12
- <Drawer.Screen name="Two" component={Two} />
16
+ <Drawer.Navigator>
17
+ <Drawer.Screen
18
+ name="Home"
19
+ component={Home}
20
+ options={{
21
+ drawerIcon: ({ size, color }) => <Ionicons name="home-outline" size={size} color={color} />,
22
+ }}
23
+ />
24
+ <Drawer.Screen name="Tabs" component={TabNavigator}
25
+ options={{
26
+ headerRight: () => (
27
+ <Pressable onPress={() => navigation.navigate('Modal')}>
28
+ {({ pressed }) => (
29
+ <FontAwesome
30
+ name="info-circle"
31
+ size={25}
32
+ color="gray"
33
+ style={[
34
+ {
35
+ marginRight: 16,
36
+ opacity: pressed ? 0.5 : 1,
37
+ },
38
+ ]}
39
+ />
40
+ )}
41
+ </Pressable>
42
+ ),
43
+ drawerIcon: ({ size, color }) => (
44
+ <MaterialIcons name="border-bottom" size={size} color={color} />
45
+ ),
46
+ }}
47
+ />
13
48
  </Drawer.Navigator>
14
49
  );
15
50
  }
@@ -6,6 +6,11 @@
6
6
  import { Text, View } from "react-native";
7
7
  <% } else if (props.stylingPackage?.name === "tamagui") { %>
8
8
  import { Button, Text } from "tamagui";
9
+ <% } else if (props.stylingPackage?.name === "restyle") { %>
10
+ import { Box, Text, useTheme } from 'theme';
11
+ <% } else if (props.stylingPackage?.name === "unistyles") { %>
12
+ import { createStyleSheet, useStyles } from 'react-native-unistyles'
13
+ import { Text, View } from 'react-native';
9
14
  <% } else { %>
10
15
  import { Text, View, StyleSheet } from "react-native";
11
16
  <% } %>
@@ -21,6 +26,14 @@
21
26
  const Stack = createStackNavigator<RootStackParamList>();
22
27
 
23
28
  export default function RootStack() {
29
+ <% if (props.stylingPackage?.name === "restyle") { %>
30
+ const { colors } = useTheme();
31
+ <% } %>
32
+
33
+ <% if (props.stylingPackage?.name === "unistyles") { %>
34
+ const { styles, theme } = useStyles(stylesheet);
35
+ <% } %>
36
+
24
37
  return (
25
38
  <NavigationContainer>
26
39
  <Stack.Navigator initialRouteName="Overview">
@@ -53,6 +66,26 @@
53
66
  </Button>
54
67
  ),
55
68
  })}
69
+ <% } else if (props.stylingPackage?.name === "restyle") { %>
70
+ options={({ navigation }) => ({
71
+ headerLeft: () => (
72
+ <Box flexDirection="row" paddingLeft="m_16">
73
+ <Feather name="chevron-left" size={16} color={colors.blue} />
74
+ <Text marginLeft="xs_4" color="blue" onPress={navigation.goBack}>
75
+ Back
76
+ </Text>
77
+ </Box>
78
+ ),
79
+ })}
80
+ <% } else if (props.stylingPackage?.name === "unistyles") { %>
81
+ options={({ navigation }) => ({
82
+ headerLeft: () => (
83
+ <View style={styles.backButton}>
84
+ <Feather name="chevron-left" size={16} color={theme.colors.azureRadiance} />
85
+ <Text style={styles.backButtonText} onPress={navigation.goBack}>Back</Text>
86
+ </View>
87
+ )
88
+ })}
56
89
  <% } else { %>
57
90
  options={({ navigation }) => ({
58
91
  headerLeft: () => (
@@ -74,6 +107,17 @@
74
107
  backButton: "flex-row",
75
108
  backButtonText: "text-blue-500 ml-1"
76
109
  };
110
+ <% } else if (props.stylingPackage?.name === "unistyles") { %>
111
+ const stylesheet = createStyleSheet((theme) => ({
112
+ backButton: {
113
+ flexDirection: 'row',
114
+ paddingLeft: 20,
115
+ },
116
+ backButtonText: {
117
+ color: theme.colors.azureRadiance,
118
+ marginLeft: 4,
119
+ },
120
+ }));
77
121
  <% } else if (props.stylingPackage?.name === "stylesheet") { %>
78
122
  const styles = StyleSheet.create({
79
123
  backButton: {
@@ -112,13 +156,13 @@
112
156
  <Stack.Screen
113
157
  name="Modal"
114
158
  component={Modal}
115
- options={{ presentation: "modal", headerLeft: null }}
159
+ options={{ presentation: "modal", headerLeft: () => null }}
116
160
  />
117
161
  </Stack.Navigator>
118
162
  </NavigationContainer>
119
163
  );
120
164
  }
121
- <% } else if (props.navigationPackage?.options.type === 'drawer') { %>
165
+ <% } else if (props.navigationPackage?.options.type === 'drawer + tabs') { %>
122
166
  import { NavigationContainer } from "@react-navigation/native";
123
167
  import { createStackNavigator } from '@react-navigation/stack';
124
168
 
@@ -128,6 +172,7 @@
128
172
  export type RootStackParamList = {
129
173
  DrawerNavigator: undefined;
130
174
  Modal: undefined;
175
+ TabNavigator: undefined;
131
176
  };
132
177
 
133
178
  const Stack = createStackNavigator<RootStackParamList>();
@@ -144,10 +189,10 @@
144
189
  <Stack.Screen
145
190
  name="Modal"
146
191
  component={Modal}
147
- options={{ presentation: "modal" }}
192
+ options={{ presentation: "modal", headerLeft: () => null }}
148
193
  />
149
194
  </Stack.Navigator>
150
195
  </NavigationContainer>
151
196
  );
152
197
  }
153
- <% } %>
198
+ <% } %>
@@ -1,57 +1,90 @@
1
- import FontAwesome from "@expo/vector-icons/FontAwesome";
2
- import { createBottomTabNavigator } from "@react-navigation/bottom-tabs";
3
- import { Pressable, StyleSheet } from "react-native";
1
+ import FontAwesome from '@expo/vector-icons/FontAwesome';
2
+ import { createBottomTabNavigator } from '@react-navigation/bottom-tabs';
3
+ import { StackScreenProps } from '@react-navigation/stack';
4
+ <% if (props.stylingPackage?.name === 'unistyles') { %>
5
+ import { createStyleSheet, useStyles } from 'react-native-unistyles'
6
+ import { Pressable } from 'react-native';
7
+ <% } else if (props.navigationPackage?.options.type === 'drawer + tabs' ) { %>
8
+ import { StyleSheet } from 'react-native';
9
+ <% } else { %>
10
+ import { Pressable, StyleSheet } from 'react-native';
11
+ <% } %>
4
12
 
5
- import One from "../screens/one";
6
- import Two from "../screens/two";
13
+ import { RootStackParamList } from '.';
14
+ import One from '../screens/one';
15
+ import Two from '../screens/two';
7
16
 
8
17
  const Tab = createBottomTabNavigator();
9
18
 
10
19
  function TabBarIcon(props: {
11
- name: React.ComponentProps<typeof FontAwesome>["name"];
20
+ name: React.ComponentProps<typeof FontAwesome>['name'];
12
21
  color: string;
13
22
  }) {
23
+ <% if (props.stylingPackage?.name === 'unistyles') {%>
24
+ const { styles } = useStyles(stylesheet)
25
+ <% } %>
14
26
  return <FontAwesome size={28} style={styles.tabBarIcon} {...props} />;
15
27
  }
16
28
 
17
- export default function TabLayout({ navigation }) {
29
+ type Props = StackScreenProps<RootStackParamList, 'TabNavigator'>;
30
+
31
+ export default function TabLayout({ navigation }: Props) {
32
+ <% if (props.stylingPackage?.name === 'unistyles') {%>
33
+ const { styles } = useStyles(stylesheet)
34
+ <% } %>
35
+
18
36
  return (
19
37
  <Tab.Navigator
20
38
  screenOptions={{
21
- tabBarActiveTintColor: "black",
39
+ tabBarActiveTintColor: 'black',
40
+ <% if (props.navigationPackage?.options.type === 'drawer + tabs') { %>
41
+ headerShown: false,
42
+ <% } %>
22
43
  }}>
23
44
  <Tab.Screen
24
- name="One"
45
+ name='One'
25
46
  component={One}
26
47
  options={{
27
- title: "Tab One",
28
- tabBarIcon: ({ color }) => <TabBarIcon name="code" color={color} />,
48
+ title: 'Tab One',
49
+ tabBarIcon: ({ color }) => <TabBarIcon name='code' color={color} />,
50
+ <% if (props.navigationPackage?.options.type === 'tabs') { %>
29
51
  headerRight: () => (
30
- <Pressable onPress={() => navigation.navigate("Modal")}>
52
+ <Pressable onPress={() => navigation.navigate('Modal')}>
31
53
  {({ pressed }) => (
32
54
  <FontAwesome
33
- name="info-circle"
55
+ name='info-circle'
34
56
  size={25}
35
- color="gray"
57
+ color='gray'
36
58
  style={[styles.headerRight, { opacity: pressed ? 0.5 : 1 }]}
37
59
  />
38
60
  )}
39
61
  </Pressable>
40
- ),
62
+ )
63
+ <% } %>
41
64
  }}
42
65
  />
43
66
  <Tab.Screen
44
- name="Two"
67
+ name='Two'
45
68
  component={Two}
46
69
  options={{
47
- title: "Tab Two",
48
- tabBarIcon: ({ color }) => <TabBarIcon name="code" color={color} />,
70
+ title: 'Tab Two',
71
+ tabBarIcon: ({ color }) => <TabBarIcon name='code' color={color} />,
49
72
  }}
50
73
  />
51
74
  </Tab.Navigator>
52
75
  );
53
76
  }
54
77
 
78
+ <% if (props.stylingPackage?.name === 'unistyles') { %>
79
+ const stylesheet = createStyleSheet({
80
+ headerRight: {
81
+ marginRight: 15
82
+ },
83
+ tabBarIcon: {
84
+ marginBottom: -3
85
+ }
86
+ });
87
+ <% } else { %>
55
88
  const styles = StyleSheet.create({
56
89
  headerRight: {
57
90
  marginRight: 15
@@ -59,4 +92,5 @@ const styles = StyleSheet.create({
59
92
  tabBarIcon: {
60
93
  marginBottom: -3
61
94
  }
62
- });
95
+ });
96
+ <% } %>
@@ -4,6 +4,11 @@ import { RouteProp, useRoute } from "@react-navigation/native";
4
4
  <% } else if (props.stylingPackage?.name === "tamagui") { %>
5
5
  import { YStack } from "tamagui";
6
6
  import { Container, Main, Subtitle, Title } from "../../tamagui.config";
7
+ <% } else if (props.stylingPackage?.name === "restyle") { %>
8
+ import { Box, Text } from 'theme';
9
+ <% } else if (props.stylingPackage?.name === "unistyles") { %>
10
+ import { createStyleSheet, useStyles } from 'react-native-unistyles'
11
+ import { View, Text } from 'react-native';
7
12
  <% } else { %>
8
13
  import { View, StyleSheet, Text } from "react-native";
9
14
  <% } %>
@@ -33,6 +38,27 @@ export default function Details() {
33
38
  </Main>
34
39
  </Container>
35
40
  );
41
+ <% } else if (props.stylingPackage?.name === "restyle") { %>
42
+ return (
43
+ <Box flex={1} padding="ml_24">
44
+ <Box flex={1} maxWidth={960}>
45
+ <Text variant="extra_large">Details</Text>
46
+ <Text variant="large" color="darkGray">
47
+ Showing details for user {router.params.name}.
48
+ </Text>
49
+ </Box>
50
+ </Box>
51
+ );
52
+ <% } else if (props.stylingPackage?.name === "unistyles") { %>
53
+ const { styles, theme } = useStyles(stylesheet)
54
+ return (
55
+ <View style={styles.container}>
56
+ <View style={styles.main}>
57
+ <Text style={theme.components.title}>Details</Text>
58
+ <Text style={theme.components.subtitle}>Showing details for user {router.params.name}.</Text>
59
+ </View>
60
+ </View>
61
+ );
36
62
  <% } else { %>
37
63
  return (
38
64
  <View style={styles.container}>
@@ -52,6 +78,18 @@ export default function Details() {
52
78
  title: "text-[64px] font-bold",
53
79
  subtitle: "text-4xl text-gray-700",
54
80
  };
81
+ <% } else if (props.stylingPackage?.name === "unistyles") { %>
82
+ const stylesheet = createStyleSheet({
83
+ container: {
84
+ flex: 1,
85
+ padding: 24,
86
+ },
87
+ main: {
88
+ flex: 1,
89
+ maxWidth: 960,
90
+ marginHorizontal: 'auto',
91
+ },
92
+ });
55
93
  <% } else if (props.stylingPackage?.name === "stylesheet") { %>
56
94
  const styles = StyleSheet.create({
57
95
  container: {
@@ -0,0 +1,83 @@
1
+ <% if (props.stylingPackage?.name === 'nativewind') { %>
2
+ import { Text, View } from 'react-native';
3
+ <% } else if (props.stylingPackage?.name === 'tamagui') { %>
4
+ import { YStack, H2, Separator, Theme } from 'tamagui';
5
+ <% } else if (props.stylingPackage?.name === 'restyle') { %>
6
+ import { Box, Text } from 'theme';
7
+ <% } else if (props.stylingPackage?.name === 'unistyles') { %>
8
+ import { useStyles } from 'react-native-unistyles'
9
+ import { Text, View } from 'react-native';
10
+ <% } else if (props.stylingPackage?.name === 'stylesheet') { %>
11
+ import { StyleSheet, Text, View } from 'react-native';
12
+ <% } %>
13
+
14
+ const Page = () => {
15
+ <% if (props.stylingPackage?.name === 'unistyles') { %>
16
+ const { theme } = useStyles();
17
+
18
+ return (
19
+ <View style={theme.components.container}>
20
+ <Text style={theme.components.title}>News</Text>
21
+ <View style={theme.components.separator} />
22
+ </View>
23
+ );
24
+ <% } else if (props.stylingPackage?.name === 'nativewind') { %>
25
+ return (
26
+ <View className={styles.container}>
27
+ <Text className={styles.title}>Home</Text>
28
+ <View className={styles.separator} />
29
+ <EditScreenInfo path='app/(tabs)/index.tsx' />
30
+ </View>
31
+ );
32
+ <% } else if (props.stylingPackage?.name === 'tamagui') { %>
33
+ return (
34
+ <Theme name='light'>
35
+ <YStack flex={1} alignItems='center' justifyContent='center'>
36
+ <H2>Home</H2>
37
+ <Separator />
38
+ </YStack>
39
+ </Theme>
40
+ );
41
+ <% } else if (props.stylingPackage?.name === 'restyle') { %>
42
+ return (
43
+ <Box flex={1} alignItems='center' justifyContent='center'>
44
+ <Text variant='title'>Home</Text>
45
+ <Box height={1} marginVertical='l_32' width='80%' />
46
+ </Box>
47
+ );
48
+ <% } else { %>
49
+ return (
50
+ <View style={styles.container}>
51
+ <Text style={styles.title}>Home</Text>
52
+ <View style={styles.separator} />
53
+ </View>
54
+ );
55
+ <% } %>
56
+ }
57
+
58
+ export default Page;
59
+
60
+ <% if (props.stylingPackage?.name === 'nativewind') { %>
61
+ const styles = {
62
+ container: `items-center flex-1 justify-center`,
63
+ separator: `h-[1px] my-7 w-4/5 bg-gray-200`,
64
+ title: `text-xl font-bold`
65
+ };
66
+ <% } else if (props.stylingPackage?.name === 'stylesheet') { %>
67
+ const styles = StyleSheet.create({
68
+ container: {
69
+ alignItems: 'center',
70
+ flex: 1,
71
+ justifyContent: 'center',
72
+ },
73
+ separator: {
74
+ height: 1,
75
+ marginVertical: 30,
76
+ width: '80%',
77
+ },
78
+ title: {
79
+ fontSize: 20,
80
+ fontWeight: 'bold',
81
+ }
82
+ });
83
+ <% } %>
@@ -3,6 +3,12 @@
3
3
  <% } else if (props.stylingPackage?.name === "tamagui") { %>
4
4
  import { YStack, Paragraph, Separator, Theme } from "tamagui";
5
5
  import { Platform } from 'react-native'
6
+ <% } else if (props.stylingPackage?.name === "restyle") { %>
7
+ import { Platform } from 'react-native';
8
+ import { Box, Text, makeStyles } from 'theme';
9
+ <% } else if (props.stylingPackage?.name === "unistyles") { %>
10
+ import { useStyles } from 'react-native-unistyles'
11
+ import { Platform, Text, View } from 'react-native';
6
12
  <% } else { %>
7
13
  import { Platform, StyleSheet, Text, View } from "react-native";
8
14
  <% } %>
@@ -20,7 +26,7 @@ export default function Modal() {
20
26
  <EditScreenInfo path="src/screens/modal.tsx" />
21
27
  </View>
22
28
  )
23
- <% } else if (props.stylingPackage?.name === "tamagui") { %>
29
+ <% } else if (props.stylingPackage?.name === "tamagui") { %>
24
30
  return (
25
31
  <Theme name="light">
26
32
  <YStack flex={1} alignItems="center" justifyContent="center">
@@ -31,6 +37,27 @@ export default function Modal() {
31
37
  </YStack>
32
38
  </Theme>
33
39
  );
40
+ <% } else if (props.stylingPackage?.name === "restyle") { %>
41
+ const styles = useStyles();
42
+
43
+ return (
44
+ <Box flex={1} alignItems="center" justifyContent="center">
45
+ <StatusBar style={Platform.OS === 'ios' ? 'light' : 'auto'} />
46
+ <Text variant="title">Modal</Text>
47
+ <Box style={styles.separator} />
48
+ <EditScreenInfo path="src/screens/modal.tsx" />
49
+ </Box>
50
+ );
51
+ <% } else if (props.stylingPackage?.name === "unistyles") { %>
52
+ const { theme } = useStyles()
53
+ return (
54
+ <View style={theme.components.container}>
55
+ <StatusBar style={Platform.OS === 'ios' ? 'light' : 'auto'} />
56
+ <Text style={theme.components.title}>Modal</Text>
57
+ <View style={theme.components.separator} />
58
+ <EditScreenInfo path='src/screens/modal.tsx' />
59
+ </View>
60
+ );
34
61
  <% } else { %>
35
62
  return (
36
63
  <View style={styles.container}>
@@ -49,6 +76,16 @@ export default function Modal() {
49
76
  separator: "h-[1px] my-7 w-4/5 bg-gray-200",
50
77
  title: "text-xl font-bold"
51
78
  };
79
+ <% } else if (props.stylingPackage?.name === "restyle") { %>
80
+ const useStyles = makeStyles((theme) => ({
81
+ separator: {
82
+ backgroundColor: theme.colors.gray,
83
+ height: 1,
84
+ marginVertical: theme.spacing.l_32,
85
+ opacity: 0.25,
86
+ width: '80%',
87
+ },
88
+ }));
52
89
  <% } else if (props.stylingPackage?.name === "stylesheet") { %>
53
90
  const styles = StyleSheet.create({
54
91
  container: {
@@ -2,6 +2,11 @@
2
2
  import { Text, View } from "react-native";
3
3
  <% } else if (props.stylingPackage?.name === "tamagui") { %>
4
4
  import { YStack, H2, Separator, Theme } from "tamagui";
5
+ <% } else if (props.stylingPackage?.name === "restyle") { %>
6
+ import { Box, Text, makeStyles } from 'theme';
7
+ <% } else if (props.stylingPackage?.name === "unistyles") { %>
8
+ import { useStyles } from 'react-native-unistyles'
9
+ import { Text, View } from 'react-native';
5
10
  <% } else { %>
6
11
  import { StyleSheet, Text, View } from "react-native";
7
12
  <% } %>
@@ -27,6 +32,25 @@ export default function TabOneScreen() {
27
32
  </YStack>
28
33
  </Theme>
29
34
  );
35
+ <% } else if (props.stylingPackage?.name === "restyle") { %>
36
+ const styles = useStyles();
37
+
38
+ return (
39
+ <Box flex={1} alignItems="center" justifyContent="center">
40
+ <Text variant="title">Tab One</Text>
41
+ <Box style={styles.separator} />
42
+ <EditScreenInfo path="src/screens/one.tsx" />
43
+ </Box>
44
+ );
45
+ <% } else if (props.stylingPackage?.name === "unistyles") { %>
46
+ const { theme } = useStyles()
47
+ return (
48
+ <View style={theme.components.container}>
49
+ <Text style={theme.components.title}>Tab One</Text>
50
+ <View style={theme.components.separator} />
51
+ <EditScreenInfo path='src/screens/one.tsx' />
52
+ </View>
53
+ );
30
54
  <% } else { %>
31
55
  return (
32
56
  <View style={styles.container}>
@@ -44,6 +68,16 @@ export default function TabOneScreen() {
44
68
  separator: "h-[1px] my-7 w-4/5 bg-gray-200",
45
69
  title: "text-xl font-bold"
46
70
  };
71
+ <% } else if (props.stylingPackage?.name === "restyle") { %>
72
+ const useStyles = makeStyles((theme) => ({
73
+ separator: {
74
+ backgroundColor: theme.colors.gray,
75
+ height: 1,
76
+ marginVertical: theme.spacing.l_32,
77
+ opacity: 0.25,
78
+ width: '80%',
79
+ },
80
+ }));
47
81
  <% } else if (props.stylingPackage?.name === "stylesheet") { %>
48
82
  const styles = StyleSheet.create({
49
83
  container: {