create-expo-stack 2.5.0-next.738ca1b → 2.5.0-next.77e2bc3
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/App.tsx.ejs +44 -110
- package/build/templates/base/components/BackButton.tsx.ejs +23 -0
- package/build/templates/base/components/Button.tsx.ejs +40 -0
- package/build/templates/base/components/EditScreenInfo.tsx.ejs +55 -0
- package/build/templates/base/components/HeaderButton.tsx.ejs +28 -0
- package/build/templates/base/components/ScreenContent.tsx.ejs +38 -0
- package/build/templates/base/components/TabBarIcon.tsx.ejs +15 -0
- package/build/templates/packages/expo-router/drawer/app/(drawer)/(tabs)/_layout.tsx.ejs +1 -13
- package/build/templates/packages/expo-router/drawer/app/(drawer)/(tabs)/index.tsx.ejs +18 -84
- package/build/templates/packages/expo-router/drawer/app/(drawer)/(tabs)/two.tsx.ejs +18 -84
- package/build/templates/packages/expo-router/drawer/app/(drawer)/_layout.tsx.ejs +4 -18
- package/build/templates/packages/expo-router/drawer/app/(drawer)/index.tsx.ejs +12 -98
- package/build/templates/packages/expo-router/drawer/app/modal.tsx.ejs +16 -92
- package/build/templates/packages/expo-router/stack/app/details.tsx.ejs +17 -171
- package/build/templates/packages/expo-router/stack/app/index.tsx.ejs +20 -202
- package/build/templates/packages/expo-router/tabs/app/(tabs)/_layout.tsx.ejs +6 -50
- package/build/templates/packages/expo-router/tabs/app/(tabs)/index.tsx.ejs +18 -102
- package/build/templates/packages/expo-router/tabs/app/(tabs)/two.tsx.ejs +18 -83
- package/build/templates/packages/expo-router/tabs/app/modal.tsx.ejs +17 -92
- package/build/templates/packages/i18next/components/InternalizationExample.tsx.ejs +1 -1
- package/build/templates/packages/i18next/translation/en.json.ejs +3 -3
- package/build/templates/packages/i18next/translation/fr.json.ejs +3 -3
- package/build/templates/packages/nativewind/components/BackButton.tsx.ejs +18 -0
- package/build/templates/packages/nativewind/components/Button.tsx.ejs +14 -0
- package/build/templates/packages/nativewind/components/EditScreenInfo.tsx.ejs +40 -0
- package/build/templates/packages/nativewind/components/ScreenContent.tsx.ejs +25 -0
- package/build/templates/packages/react-navigation/App.tsx.ejs +1 -1
- package/build/templates/packages/react-navigation/navigation/drawer-navigator.tsx.ejs +14 -26
- package/build/templates/packages/react-navigation/navigation/index.tsx.ejs +2 -101
- package/build/templates/packages/react-navigation/navigation/tab-navigator.tsx.ejs +8 -62
- package/build/templates/packages/react-navigation/screens/details.tsx.ejs +22 -108
- package/build/templates/packages/react-navigation/screens/home.tsx.ejs +3 -100
- package/build/templates/packages/react-navigation/screens/modal.tsx.ejs +16 -104
- package/build/templates/packages/react-navigation/screens/one.tsx.ejs +2 -115
- package/build/templates/packages/react-navigation/screens/overview.tsx.ejs +37 -199
- package/build/templates/packages/react-navigation/screens/two.tsx.ejs +3 -98
- package/build/templates/packages/restyle/components/BackButton.tsx.ejs +15 -0
- package/build/templates/packages/restyle/components/Button.tsx.ejs +32 -0
- package/build/templates/packages/restyle/components/EditScreenInfo.tsx.ejs +29 -0
- package/build/templates/packages/restyle/components/ScreenContent.tsx.ejs +20 -0
- package/build/templates/packages/tamagui/components/BackButton.tsx.ejs +19 -0
- package/build/templates/packages/tamagui/components/Button.tsx.ejs +9 -0
- package/build/templates/packages/tamagui/components/EditScreenInfo.tsx.ejs +29 -0
- package/build/templates/packages/tamagui/components/ScreenContent.tsx.ejs +22 -0
- package/build/templates/packages/unistyles/components/BackButton.tsx.ejs +26 -0
- package/build/templates/packages/unistyles/components/Button.tsx.ejs +12 -0
- package/build/templates/packages/unistyles/components/EditScreenInfo.tsx.ejs +61 -0
- package/build/templates/packages/unistyles/components/ScreenContent.tsx.ejs +24 -0
- package/build/templates/packages/unistyles/theme.ts.ejs +30 -46
- package/build/utilities/configureProjectFiles.js +68 -10
- package/build/utilities/generateProjectFiles.js +2 -2
- package/package.json +1 -1
- package/build/templates/packages/expo-router/drawer/components/edit-screen-info.tsx.ejs +0 -153
- package/build/templates/packages/expo-router/tabs/components/edit-screen-info.tsx.ejs +0 -153
- package/build/templates/packages/react-navigation/components/edit-screen-info.tsx.ejs +0 -180
|
@@ -1,108 +1,22 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
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
|
-
<% if (props.internalizationPackage?.name === "i18next") { %>
|
|
14
|
-
import { InternalizationExample } from '../../components/InternalizationExample';
|
|
15
|
-
<% } %>
|
|
1
|
+
import { Stack } from 'expo-router';
|
|
2
|
+
import { StyleSheet, View } from 'react-native';
|
|
16
3
|
|
|
17
|
-
import
|
|
4
|
+
import { ScreenContent } from '~/components/ScreenContent';
|
|
18
5
|
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
<Text style={theme.components.title}>Home</Text>
|
|
26
|
-
<% if (props.internalizationPackage?.name === "i18next") { %>
|
|
27
|
-
<InternalizationExample />
|
|
28
|
-
<% } %>
|
|
29
|
-
<View style={theme.components.separator} />
|
|
30
|
-
<EditScreenInfo path="app/(tabs)/index.tsx" />
|
|
6
|
+
export default function Home() {
|
|
7
|
+
return (
|
|
8
|
+
<>
|
|
9
|
+
<Stack.Screen options={{ title: 'Home' }} />
|
|
10
|
+
<View style={styles.container}>
|
|
11
|
+
<ScreenContent path="app/(drawer)/(tabs)/index.tsx" title="Home" />
|
|
31
12
|
</View>
|
|
32
|
-
|
|
33
|
-
<% } else if (props.stylingPackage?.name === "nativewind") { %>
|
|
34
|
-
return (
|
|
35
|
-
<View className={styles.container}>
|
|
36
|
-
<Text className={styles.title}>Home</Text>
|
|
37
|
-
<% if (props.internalizationPackage?.name === "i18next") { %>
|
|
38
|
-
<InternalizationExample />
|
|
39
|
-
<% } %>
|
|
40
|
-
<View className={styles.separator} />
|
|
41
|
-
<EditScreenInfo path="app/(tabs)/index.tsx" />
|
|
42
|
-
</View>
|
|
43
|
-
);
|
|
44
|
-
<% } else if (props.stylingPackage?.name === "tamagui") { %>
|
|
45
|
-
return (
|
|
46
|
-
<Theme name="light">
|
|
47
|
-
<YStack flex={1} alignItems="center" justifyContent="center">
|
|
48
|
-
<H2>Home</H2>
|
|
49
|
-
<% if (props.internalizationPackage?.name === "i18next") { %>
|
|
50
|
-
<InternalizationExample />
|
|
51
|
-
<% } %>
|
|
52
|
-
<Separator />
|
|
53
|
-
<EditScreenInfo path="app/(tabs)/index.tsx" />
|
|
54
|
-
</YStack>
|
|
55
|
-
</Theme>
|
|
56
|
-
);
|
|
57
|
-
<% } else if (props.stylingPackage?.name === "restyle") { %>
|
|
58
|
-
return (
|
|
59
|
-
<Box flex={1} alignItems="center" justifyContent="center">
|
|
60
|
-
<Text variant="title">Home</Text>
|
|
61
|
-
<% if (props.internalizationPackage?.name === "i18next") { %>
|
|
62
|
-
<InternalizationExample />
|
|
63
|
-
<% } %>
|
|
64
|
-
<Box height={1} marginVertical="l_32" width="80%" />
|
|
65
|
-
<EditScreenInfo path="app/(tabs)/index.tsx" />
|
|
66
|
-
</Box>
|
|
67
|
-
);
|
|
68
|
-
<% } else { %>
|
|
69
|
-
return (
|
|
70
|
-
<View style={styles.container}>
|
|
71
|
-
<Text style={styles.title}>Home</Text>
|
|
72
|
-
<% if (props.internalizationPackage?.name === "i18next") { %>
|
|
73
|
-
<InternalizationExample />
|
|
74
|
-
<% } %>
|
|
75
|
-
<View style={styles.separator} />
|
|
76
|
-
<EditScreenInfo path="app/(tabs)/index.tsx" />
|
|
77
|
-
</View>
|
|
13
|
+
</>
|
|
78
14
|
);
|
|
79
|
-
<% } %>
|
|
80
15
|
}
|
|
81
16
|
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
<% if (props.stylingPackage?.name === "nativewind") { %>
|
|
85
|
-
const styles = {
|
|
86
|
-
container: `items-center flex-1 justify-center`,
|
|
87
|
-
separator: `h-[1px] my-7 w-4/5 bg-gray-200`,
|
|
88
|
-
title: `text-xl font-bold`
|
|
89
|
-
};
|
|
90
|
-
<% } else if (props.stylingPackage?.name === "stylesheet") { %>
|
|
91
|
-
const styles = StyleSheet.create({
|
|
17
|
+
const styles = StyleSheet.create({
|
|
92
18
|
container: {
|
|
93
|
-
alignItems: "center",
|
|
94
19
|
flex: 1,
|
|
95
|
-
|
|
96
|
-
},
|
|
97
|
-
separator: {
|
|
98
|
-
backgroundColor: '#d1d5db',
|
|
99
|
-
height: 1,
|
|
100
|
-
marginVertical: 30,
|
|
101
|
-
width: "80%",
|
|
20
|
+
padding: 24,
|
|
102
21
|
},
|
|
103
|
-
title: {
|
|
104
|
-
fontSize: 20,
|
|
105
|
-
fontWeight: "bold",
|
|
106
|
-
}
|
|
107
22
|
});
|
|
108
|
-
<% } %>
|
|
@@ -1,96 +1,20 @@
|
|
|
1
|
-
|
|
2
|
-
import { Platform, Text, View } from 'react-native';
|
|
3
|
-
<% } else if (props.stylingPackage?.name === 'tamagui') { %>
|
|
4
|
-
import { YStack, Paragraph, Separator, Theme } from 'tamagui';
|
|
5
|
-
import { Platform } from 'react-native'
|
|
6
|
-
<% } else if (props.stylingPackage?.name === 'restyle') { %>
|
|
7
|
-
import { Platform } from 'react-native';
|
|
8
|
-
import { Box, Text } from 'theme';
|
|
9
|
-
<% } else if (props.stylingPackage?.name === 'unistyles') { %>
|
|
10
|
-
import { useStyles } from 'react-native-unistyles'
|
|
11
|
-
import { Platform, Text, View } from 'react-native';
|
|
12
|
-
<% } else { %>
|
|
13
|
-
import { Platform, StyleSheet, Text, View } from 'react-native';
|
|
14
|
-
<% } %>
|
|
1
|
+
import { ScreenContent } from 'components/ScreenContent';
|
|
15
2
|
import { StatusBar } from 'expo-status-bar';
|
|
3
|
+
import { Platform } from 'react-native';
|
|
16
4
|
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
<% if (props.stylingPackage?.name === 'unistyles') { %>
|
|
21
|
-
const { theme } = useStyles()
|
|
5
|
+
<% if (props.internalizationPackage?.name === "i18next") { %>
|
|
6
|
+
import { InternalizationExample } from 'components/InternalizationExample';
|
|
7
|
+
<% } %>
|
|
22
8
|
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
<StatusBar style={Platform.OS === 'ios' ? 'light' : 'auto'} />
|
|
35
|
-
<Text className={styles.title}>Modal</Text>
|
|
36
|
-
<View className={styles.separator} />
|
|
37
|
-
<EditScreenInfo path='app/modal.tsx' />
|
|
38
|
-
</View>
|
|
39
|
-
);
|
|
40
|
-
<% } else if (props.stylingPackage?.name === 'tamagui') { %>
|
|
41
|
-
return (
|
|
42
|
-
<Theme name='light'>
|
|
43
|
-
<YStack flex={1} alignItems='center' justifyContent='center'>
|
|
44
|
-
<StatusBar style={Platform.OS === 'ios' ? 'light' : 'auto'} />
|
|
45
|
-
<Paragraph>Modal</Paragraph>
|
|
46
|
-
<Separator />
|
|
47
|
-
<EditScreenInfo path='app/modal.tsx' />
|
|
48
|
-
</YStack>
|
|
49
|
-
</Theme>
|
|
50
|
-
);
|
|
51
|
-
<% } else if (props.stylingPackage?.name === 'restyle') { %>
|
|
52
|
-
return (
|
|
53
|
-
<Box flex={1} alignItems='center' justifyContent='center'>
|
|
54
|
-
<StatusBar style={Platform.OS === 'ios' ? 'light' : 'auto'} />
|
|
55
|
-
<Text variant='title'>Modal</Text>
|
|
56
|
-
<Box height={1} marginVertical='l_32' width='80%' />
|
|
57
|
-
<EditScreenInfo path='app/modal.tsx' />
|
|
58
|
-
</Box>
|
|
59
|
-
);
|
|
60
|
-
<% } else { %>
|
|
61
|
-
return (
|
|
62
|
-
<View style={styles.container}>
|
|
63
|
-
<StatusBar style={Platform.OS === 'ios' ? 'light' : 'auto'} />
|
|
64
|
-
<Text style={styles.title}>Modal</Text>
|
|
65
|
-
<View style={styles.separator} />
|
|
66
|
-
<EditScreenInfo path='app/modal.tsx' />
|
|
67
|
-
</View>
|
|
68
|
-
);
|
|
69
|
-
<% } %>
|
|
9
|
+
export default function Modal() {
|
|
10
|
+
return (
|
|
11
|
+
<>
|
|
12
|
+
<ScreenContent path="app/modal.tsx" title="Modal">
|
|
13
|
+
<% if (props.internalizationPackage?.name === "i18next") { %>
|
|
14
|
+
<InternalizationExample />
|
|
15
|
+
<% } %>
|
|
16
|
+
</ScreenContent>
|
|
17
|
+
<StatusBar style={Platform.OS === 'ios' ? 'light' : 'auto'} />
|
|
18
|
+
</>
|
|
19
|
+
);
|
|
70
20
|
}
|
|
71
|
-
|
|
72
|
-
<% if (props.stylingPackage?.name === 'nativewind') { %>
|
|
73
|
-
const styles = {
|
|
74
|
-
container: `items-center flex-1 justify-center`,
|
|
75
|
-
separator: `h-[1px] my-7 w-4/5 bg-gray-200`,
|
|
76
|
-
title: `text-xl font-bold`
|
|
77
|
-
};
|
|
78
|
-
<% } else if (props.stylingPackage?.name === 'stylesheet') { %>
|
|
79
|
-
const styles = StyleSheet.create({
|
|
80
|
-
container: {
|
|
81
|
-
alignItems: 'center',
|
|
82
|
-
flex: 1,
|
|
83
|
-
justifyContent: 'center'
|
|
84
|
-
},
|
|
85
|
-
separator: {
|
|
86
|
-
backgroundColor: '#d1d5db',
|
|
87
|
-
height: 1,
|
|
88
|
-
marginVertical: 30,
|
|
89
|
-
width: '80%'
|
|
90
|
-
},
|
|
91
|
-
title: {
|
|
92
|
-
fontSize: 20,
|
|
93
|
-
fontWeight: 'bold'
|
|
94
|
-
}
|
|
95
|
-
});
|
|
96
|
-
<% } %>
|
|
@@ -1,177 +1,23 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
import React from "react";
|
|
5
|
-
import { Stack, useRouter } from "expo-router";
|
|
6
|
-
import { Button, Text, YStack } from "tamagui";
|
|
7
|
-
import { Container, Main, Subtitle, Title } from "../tamagui.config";
|
|
8
|
-
<% } else if (props.stylingPackage?.name === "restyle") { %>
|
|
9
|
-
import { Box, Text } from 'theme';
|
|
10
|
-
import { TouchableOpacity } from 'react-native';
|
|
11
|
-
<% } else if (props.stylingPackage?.name === "unistyles") { %>
|
|
12
|
-
import { createStyleSheet, useStyles } from 'react-native-unistyles';
|
|
13
|
-
import { Text, TouchableOpacity, View } from "react-native";
|
|
14
|
-
<% } else { %>
|
|
15
|
-
import { StyleSheet, Text, TouchableOpacity, View } from "react-native";
|
|
16
|
-
<% } %>
|
|
17
|
-
import { Feather } from '@expo/vector-icons';
|
|
18
|
-
import { Stack, useLocalSearchParams, useRouter } from "expo-router";
|
|
1
|
+
import { ScreenContent } from 'components/ScreenContent';
|
|
2
|
+
import { Stack, useLocalSearchParams } from 'expo-router';
|
|
3
|
+
import { StyleSheet, View } from 'react-native';
|
|
19
4
|
|
|
20
5
|
export default function Details() {
|
|
21
|
-
|
|
22
|
-
const router = useRouter();
|
|
6
|
+
const { name } = useLocalSearchParams();
|
|
23
7
|
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
const BackButton = () => (
|
|
28
|
-
<TouchableOpacity onPress={router.back}>
|
|
29
|
-
<View style={styles.backButton}>
|
|
30
|
-
<Feather name='chevron-left' size={16} color={theme.colors.azureRadiance} />
|
|
31
|
-
<Text style={styles.backButtonText}>Back</Text>
|
|
32
|
-
</View>
|
|
33
|
-
</TouchableOpacity>
|
|
34
|
-
);
|
|
35
|
-
<% } else if (props.stylingPackage?.name === "nativewind") { %>
|
|
36
|
-
const BackButton = () => (
|
|
37
|
-
<TouchableOpacity onPress={router.back}>
|
|
38
|
-
<View className={styles.backButton}>
|
|
39
|
-
<Feather name="chevron-left" size={16} color="#007AFF" />
|
|
40
|
-
<Text className={styles.backButtonText}>Back</Text>
|
|
41
|
-
</View>
|
|
42
|
-
</TouchableOpacity>
|
|
43
|
-
);
|
|
44
|
-
<% } else if (props.stylingPackage?.name === "tamagui") { %>
|
|
45
|
-
|
|
46
|
-
const BackButton = () => (
|
|
47
|
-
<Button unstyled flexDirection="row" backgroundColor="transparent" paddingLeft={0} pressStyle={{ opacity: 0.5 }} onPress={router.back} icon={<Feather name="chevron-left" size={16} color="#007AFF" />}><Text color="#007AFF">Back</Text></Button>
|
|
48
|
-
)
|
|
49
|
-
<% } else if (props.stylingPackage?.name === "restyle") { %>
|
|
50
|
-
const BackButton = () => (
|
|
51
|
-
<TouchableOpacity onPress={router.back}>
|
|
52
|
-
<Box flexDirection="row">
|
|
53
|
-
<Feather name="chevron-left" size={16} color="#007AFF" />
|
|
54
|
-
<Text color="blue" marginLeft="xs_4">
|
|
55
|
-
Back
|
|
56
|
-
</Text>
|
|
57
|
-
</Box>
|
|
58
|
-
</TouchableOpacity>
|
|
59
|
-
);
|
|
60
|
-
<% } else { %>
|
|
61
|
-
const BackButton = () => (
|
|
62
|
-
<TouchableOpacity onPress={router.back}>
|
|
63
|
-
<View style={styles.backButton}>
|
|
64
|
-
<Feather name="chevron-left" size={16} color="#007AFF" />
|
|
65
|
-
<Text style={styles.backButtonText}>Back</Text>
|
|
66
|
-
</View>
|
|
67
|
-
</TouchableOpacity>
|
|
68
|
-
);
|
|
69
|
-
<% } %>
|
|
70
|
-
|
|
71
|
-
return (
|
|
72
|
-
<% if (props.stylingPackage?.name === "nativewind") { %>
|
|
73
|
-
<View className={styles.container}>
|
|
74
|
-
<Stack.Screen options={{ title: "Details", headerLeft: () => <BackButton /> }} />
|
|
75
|
-
<View className={styles.main}>
|
|
76
|
-
<Text className={styles.title}>Details</Text>
|
|
77
|
-
<Text className={styles.subtitle}>Showing details for user {name}.</Text>
|
|
78
|
-
</View>
|
|
79
|
-
</View>
|
|
80
|
-
<% } else if (props.stylingPackage?.name === "tamagui") { %>
|
|
81
|
-
<Container>
|
|
82
|
-
<Stack.Screen options={{ title: "Details", headerLeft: () => <BackButton /> }} />
|
|
83
|
-
<Main>
|
|
84
|
-
<YStack>
|
|
85
|
-
<Title>Details</Title>
|
|
86
|
-
<Subtitle>Showing details for user {name}.</Subtitle>
|
|
87
|
-
</YStack>
|
|
88
|
-
</Main>
|
|
89
|
-
</Container>
|
|
90
|
-
<% } else if (props.stylingPackage?.name === "restyle") { %>
|
|
91
|
-
<>
|
|
92
|
-
<Stack.Screen options={{ title: 'Details', headerLeft: () => <BackButton /> }} />
|
|
93
|
-
<Box flex={1} padding="ml_24">
|
|
94
|
-
<Box flex={1} maxWidth={960}>
|
|
95
|
-
<Text variant="extra_large">Details</Text>
|
|
96
|
-
<Text variant="large" color="darkGray">
|
|
97
|
-
Showing details for user {name}.
|
|
98
|
-
</Text>
|
|
99
|
-
</Box>
|
|
100
|
-
</Box>
|
|
101
|
-
</>
|
|
102
|
-
<% } else if (props.stylingPackage?.name === "unistyles") { %>
|
|
8
|
+
return (
|
|
9
|
+
<>
|
|
10
|
+
<Stack.Screen options={{ title: 'Details' }} />
|
|
103
11
|
<View style={styles.container}>
|
|
104
|
-
<
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
</View>
|
|
109
|
-
</View>
|
|
110
|
-
<% } else { %>
|
|
111
|
-
<View style={styles.container}>
|
|
112
|
-
<Stack.Screen options={{ title: "Details", headerLeft: () => <BackButton /> }} />
|
|
113
|
-
<View style={styles.main}>
|
|
114
|
-
<Text style={styles.title}>Details</Text>
|
|
115
|
-
<Text style={styles.subtitle}>Showing details for user {name}.</Text>
|
|
116
|
-
</View>
|
|
117
|
-
</View>
|
|
118
|
-
<% } %>
|
|
119
|
-
);
|
|
12
|
+
<ScreenContent path="screens/details.tsx" title={`Showing details for user ${name}`} />
|
|
13
|
+
</View>
|
|
14
|
+
</>
|
|
15
|
+
);
|
|
120
16
|
}
|
|
121
17
|
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
title: "text-[64px] font-bold",
|
|
129
|
-
subtitle: "text-4xl text-gray-700",
|
|
130
|
-
};
|
|
131
|
-
<% } else if (props.stylingPackage?.name === "unistyles") { %>
|
|
132
|
-
const stylesheet = createStyleSheet((theme) => ({
|
|
133
|
-
backButton: {
|
|
134
|
-
flexDirection: 'row',
|
|
135
|
-
},
|
|
136
|
-
backButtonText: {
|
|
137
|
-
color: theme.colors.azureRadiance,
|
|
138
|
-
marginLeft: 4,
|
|
139
|
-
},
|
|
140
|
-
container: {
|
|
141
|
-
flex: 1,
|
|
142
|
-
padding: 24,
|
|
143
|
-
},
|
|
144
|
-
main: {
|
|
145
|
-
flex: 1,
|
|
146
|
-
maxWidth: 960,
|
|
147
|
-
marginHorizontal: 'auto',
|
|
148
|
-
},
|
|
149
|
-
}));
|
|
150
|
-
<% } else if (props.stylingPackage?.name === "stylesheet") { %>
|
|
151
|
-
const styles = StyleSheet.create({
|
|
152
|
-
backButton: {
|
|
153
|
-
flexDirection: "row",
|
|
154
|
-
},
|
|
155
|
-
backButtonText: {
|
|
156
|
-
color: "#007AFF",
|
|
157
|
-
marginLeft: 4,
|
|
158
|
-
},
|
|
159
|
-
container: {
|
|
160
|
-
flex: 1,
|
|
161
|
-
padding: 24,
|
|
162
|
-
},
|
|
163
|
-
main: {
|
|
164
|
-
flex: 1,
|
|
165
|
-
maxWidth: 960,
|
|
166
|
-
marginHorizontal: "auto",
|
|
167
|
-
},
|
|
168
|
-
title: {
|
|
169
|
-
fontSize: 64,
|
|
170
|
-
fontWeight: "bold",
|
|
171
|
-
},
|
|
172
|
-
subtitle: {
|
|
173
|
-
fontSize: 36,
|
|
174
|
-
color: "#38434D",
|
|
175
|
-
},
|
|
176
|
-
});
|
|
177
|
-
<% } %>
|
|
18
|
+
const styles = StyleSheet.create({
|
|
19
|
+
container: {
|
|
20
|
+
flex: 1,
|
|
21
|
+
padding: 24,
|
|
22
|
+
},
|
|
23
|
+
});
|
|
@@ -1,217 +1,35 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
<% } else if (props.stylingPackage?.name === "tamagui") { %>
|
|
4
|
-
import { YStack } from "tamagui";
|
|
5
|
-
import { Container, Main, Title, Subtitle, Button, ButtonText } from '../tamagui.config';
|
|
6
|
-
<% } else if (props.stylingPackage?.name === "restyle") { %>
|
|
7
|
-
import { TouchableOpacity } from 'react-native';
|
|
8
|
-
import { Box, Text, makeStyles } from 'theme';
|
|
9
|
-
<% } else if (props.stylingPackage?.name === "unistyles") { %>
|
|
10
|
-
import { createStyleSheet, useStyles } from 'react-native-unistyles';
|
|
11
|
-
import { Text, TouchableOpacity, View } from 'react-native';
|
|
12
|
-
<% } else { %>
|
|
13
|
-
import { StyleSheet, Text, TouchableOpacity, View } from "react-native";
|
|
14
|
-
<% } %>
|
|
15
|
-
<% if (props.internalizationPackage?.name === "i18next") { %>
|
|
16
|
-
import { InternalizationExample } from '../components/InternalizationExample';
|
|
17
|
-
<% } %>
|
|
18
|
-
import { Stack } from "expo-router";
|
|
1
|
+
import { Stack, Link } from 'expo-router';
|
|
2
|
+
import { StyleSheet, View } from 'react-native';
|
|
19
3
|
|
|
20
|
-
import {
|
|
4
|
+
import { Button } from '../components/Button';
|
|
21
5
|
|
|
22
|
-
|
|
23
|
-
<% if (props.stylingPackage?.name === "restyle") { %>
|
|
24
|
-
const styles = useStyles();
|
|
25
|
-
<% } %>
|
|
6
|
+
import { ScreenContent } from '~/components/ScreenContent';
|
|
26
7
|
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
8
|
+
<% if (props.internalizationPackage?.name === "i18next") { %>
|
|
9
|
+
import { InternalizationExample } from 'components/InternalizationExample';
|
|
10
|
+
<% } %>
|
|
30
11
|
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
<View className={styles.main}>
|
|
36
|
-
<View>
|
|
37
|
-
<Text className={styles.title}>Hello World</Text>
|
|
38
|
-
<Text className={styles.subtitle}>This is the first page of your app.</Text>
|
|
39
|
-
<% if (props.internalizationPackage?.name === "i18next") { %>
|
|
40
|
-
<InternalizationExample />
|
|
41
|
-
<% } %>
|
|
42
|
-
</View>
|
|
43
|
-
<Link href={{ pathname: "/details", params: { name: "Dan" } }} asChild>
|
|
44
|
-
<TouchableOpacity className={styles.button} >
|
|
45
|
-
<Text className={styles.buttonText}>Show Details</Text>
|
|
46
|
-
</TouchableOpacity>
|
|
47
|
-
</Link>
|
|
48
|
-
</View>
|
|
49
|
-
</View>
|
|
50
|
-
<% } else if (props.stylingPackage?.name === "tamagui") { %>
|
|
51
|
-
<Container>
|
|
52
|
-
<Main>
|
|
53
|
-
<Stack.Screen options={{ title: "Overview" }} />
|
|
54
|
-
<YStack>
|
|
55
|
-
<Title>Hello World</Title>
|
|
56
|
-
<Subtitle>This is the first page of your app.</Subtitle>
|
|
57
|
-
<% if (props.internalizationPackage?.name === "i18next") { %>
|
|
58
|
-
<InternalizationExample />
|
|
59
|
-
<% } %>
|
|
60
|
-
</YStack>
|
|
61
|
-
<Link href={{ pathname: "/details", params: { name: "Dan" } }} asChild>
|
|
62
|
-
<Button><ButtonText>Show Details</ButtonText></Button>
|
|
63
|
-
</Link>
|
|
64
|
-
</Main>
|
|
65
|
-
</Container>
|
|
66
|
-
<% } else if (props.stylingPackage?.name === "restyle") { %>
|
|
67
|
-
<>
|
|
68
|
-
<Stack.Screen options={{ title: "Overview" }} />
|
|
69
|
-
<Box flex={1} padding="ml_24">
|
|
70
|
-
<Box flex={1} maxWidth={960} justifyContent="space-between">
|
|
71
|
-
<Box>
|
|
72
|
-
<Text variant="extra_large">Hello World</Text>
|
|
73
|
-
<Text variant="large" color="darkGray">
|
|
74
|
-
This is the first page of your app.
|
|
75
|
-
</Text>
|
|
76
|
-
<% if (props.internalizationPackage?.name === "i18next") { %>
|
|
77
|
-
<InternalizationExample />
|
|
78
|
-
<% } %>
|
|
79
|
-
</Box>
|
|
80
|
-
<Link href={{ pathname: '/details', params: { name: 'Dan' } }} asChild>
|
|
81
|
-
<TouchableOpacity
|
|
82
|
-
style={styles.button}
|
|
83
|
-
>
|
|
84
|
-
<Text variant="body" textAlign="center" color="white" fontWeight="600">
|
|
85
|
-
Show Details
|
|
86
|
-
</Text>
|
|
87
|
-
</TouchableOpacity>
|
|
88
|
-
</Link>
|
|
89
|
-
</Box>
|
|
90
|
-
</Box>
|
|
91
|
-
</>
|
|
92
|
-
<% } else if (props.stylingPackage?.name === "unistyles") { %>
|
|
12
|
+
export default function Home() {
|
|
13
|
+
return (
|
|
14
|
+
<>
|
|
15
|
+
<Stack.Screen options={{ title: 'Home' }} />
|
|
93
16
|
<View style={styles.container}>
|
|
94
|
-
<
|
|
95
|
-
<Stack.Screen options={{ title: 'Overview' }} />
|
|
96
|
-
<View>
|
|
97
|
-
<Text style={theme.components.title}>Hello World</Text>
|
|
98
|
-
<Text style={theme.components.subtitle}>This is the first page of your app.</Text>
|
|
99
|
-
<% if (props.internalizationPackage?.name === "i18next") { %>
|
|
100
|
-
<InternalizationExample />
|
|
101
|
-
<% } %>
|
|
102
|
-
</View>
|
|
103
|
-
<Link href={{ pathname: '/details', params: { name: 'Dan' } }} asChild>
|
|
104
|
-
<TouchableOpacity style={theme.components.button} >
|
|
105
|
-
<Text style={theme.components.buttonText}>Show Details</Text>
|
|
106
|
-
</TouchableOpacity>
|
|
107
|
-
</Link>
|
|
108
|
-
</View>
|
|
109
|
-
</View>
|
|
110
|
-
<% } else { %>
|
|
111
|
-
<View style={styles.container}>
|
|
112
|
-
<View style={styles.main}>
|
|
113
|
-
<Stack.Screen options={{ title: "Overview" }} />
|
|
114
|
-
<View>
|
|
115
|
-
<Text style={styles.title}>Hello World</Text>
|
|
116
|
-
<Text style={styles.subtitle}>This is the first page of your app.</Text>
|
|
17
|
+
<ScreenContent path="app/index.tsx" title="Home">
|
|
117
18
|
<% if (props.internalizationPackage?.name === "i18next") { %>
|
|
118
19
|
<InternalizationExample />
|
|
119
20
|
<% } %>
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
</View>
|
|
128
|
-
<% } %>
|
|
129
|
-
);
|
|
21
|
+
</ScreenContent>
|
|
22
|
+
<Link href={{ pathname: '/details', params: { name: 'Dan' } }} asChild>
|
|
23
|
+
<Button title="Show Details" />
|
|
24
|
+
</Link>
|
|
25
|
+
</View>
|
|
26
|
+
</>
|
|
27
|
+
);
|
|
130
28
|
}
|
|
131
29
|
|
|
132
|
-
|
|
133
|
-
const styles = {
|
|
134
|
-
button: "items-center bg-indigo-500 rounded-[28px] shadow-md p-4",
|
|
135
|
-
buttonText: "text-white text-lg font-semibold text-center",
|
|
136
|
-
container: "flex-1 p-6",
|
|
137
|
-
main: "flex-1 max-w-[960] justify-between",
|
|
138
|
-
title: "text-[64px] font-bold",
|
|
139
|
-
subtitle: "text-4xl text-gray-700",
|
|
140
|
-
};
|
|
141
|
-
<% } else if (props.stylingPackage?.name === "restyle") { %>
|
|
142
|
-
const useStyles = makeStyles((theme) => ({
|
|
143
|
-
button: {
|
|
144
|
-
alignItems: 'center',
|
|
145
|
-
backgroundColor: theme.colors.purple,
|
|
146
|
-
borderRadius: theme.borderRadii.xl_24,
|
|
147
|
-
elevation: 5,
|
|
148
|
-
flexDirection: 'row',
|
|
149
|
-
justifyContent: 'center',
|
|
150
|
-
padding: theme.spacing.m_16,
|
|
151
|
-
shadowColor: theme.colors.black,
|
|
152
|
-
shadowOffset: {
|
|
153
|
-
height: 2,
|
|
154
|
-
width: 0,
|
|
155
|
-
},
|
|
156
|
-
shadowOpacity: 0.25,
|
|
157
|
-
shadowRadius: 3.84,
|
|
158
|
-
},
|
|
159
|
-
}));
|
|
160
|
-
<% } else if (props.stylingPackage?.name === "unistyles") { %>
|
|
161
|
-
const stylesheet = createStyleSheet({
|
|
30
|
+
const styles = StyleSheet.create({
|
|
162
31
|
container: {
|
|
163
32
|
flex: 1,
|
|
164
33
|
padding: 24,
|
|
165
34
|
},
|
|
166
|
-
main: {
|
|
167
|
-
flex: 1,
|
|
168
|
-
maxWidth: 960,
|
|
169
|
-
marginHorizontal: 'auto',
|
|
170
|
-
justifyContent: 'space-between',
|
|
171
|
-
},
|
|
172
35
|
});
|
|
173
|
-
|
|
174
|
-
<% } else if (props.stylingPackage?.name === "stylesheet") { %>
|
|
175
|
-
const styles = StyleSheet.create({
|
|
176
|
-
button: {
|
|
177
|
-
alignItems: "center",
|
|
178
|
-
backgroundColor: "#6366F1",
|
|
179
|
-
borderRadius: 24,
|
|
180
|
-
elevation: 5,
|
|
181
|
-
flexDirection: "row",
|
|
182
|
-
justifyContent: "center",
|
|
183
|
-
padding: 16,
|
|
184
|
-
shadowColor: "#000",
|
|
185
|
-
shadowOffset: {
|
|
186
|
-
height: 2,
|
|
187
|
-
width: 0
|
|
188
|
-
},
|
|
189
|
-
shadowOpacity: 0.25,
|
|
190
|
-
shadowRadius: 3.84
|
|
191
|
-
},
|
|
192
|
-
buttonText: {
|
|
193
|
-
color: "#FFFFFF",
|
|
194
|
-
fontSize: 16,
|
|
195
|
-
fontWeight: "600",
|
|
196
|
-
textAlign: "center",
|
|
197
|
-
},
|
|
198
|
-
container: {
|
|
199
|
-
flex: 1,
|
|
200
|
-
padding: 24,
|
|
201
|
-
},
|
|
202
|
-
main: {
|
|
203
|
-
flex: 1,
|
|
204
|
-
maxWidth: 960,
|
|
205
|
-
marginHorizontal: "auto",
|
|
206
|
-
justifyContent: "space-between",
|
|
207
|
-
},
|
|
208
|
-
title: {
|
|
209
|
-
fontSize: 64,
|
|
210
|
-
fontWeight: "bold",
|
|
211
|
-
},
|
|
212
|
-
subtitle: {
|
|
213
|
-
color: "#38434D",
|
|
214
|
-
fontSize: 36,
|
|
215
|
-
}
|
|
216
|
-
});
|
|
217
|
-
<% } %>
|