create-expo-stack 2.4.3 → 2.5.0-next.160eed8
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/README.md +4 -4
- package/build/commands/create-expo-stack.js +12 -4
- package/build/templates/base/App.tsx.ejs +51 -91
- package/build/templates/base/app.json.ejs +6 -0
- 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/base/package.json.ejs +16 -6
- package/build/templates/base/prettier.config.js.ejs +11 -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 -80
- package/build/templates/packages/expo-router/drawer/app/_layout.tsx.ejs +4 -0
- package/build/templates/packages/expo-router/drawer/app/modal.tsx.ejs +16 -92
- package/build/templates/packages/expo-router/stack/app/_layout.tsx.ejs +3 -0
- package/build/templates/packages/expo-router/stack/app/details.tsx.ejs +17 -171
- package/build/templates/packages/expo-router/stack/app/index.tsx.ejs +23 -187
- 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 -84
- package/build/templates/packages/expo-router/tabs/app/(tabs)/two.tsx.ejs +18 -83
- package/build/templates/packages/expo-router/tabs/app/_layout.tsx.ejs +3 -0
- package/build/templates/packages/expo-router/tabs/app/modal.tsx.ejs +17 -92
- package/build/templates/packages/i18next/components/InternalizationExample.tsx.ejs +23 -0
- package/build/templates/packages/i18next/core/i18n/fallbackChecker.ts.ejs +13 -0
- package/build/templates/packages/i18next/core/i18n/init.ts.ejs +24 -0
- package/build/templates/packages/i18next/core/i18n/languageDetector.ts.ejs +13 -0
- package/build/templates/packages/i18next/translation/en.json.ejs +8 -0
- package/build/templates/packages/i18next/translation/fr.json.ejs +8 -0
- package/build/templates/packages/i18next/translation/index.ts.ejs +20 -0
- 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 +4 -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 -82
- package/build/templates/packages/react-navigation/screens/modal.tsx.ejs +16 -104
- package/build/templates/packages/react-navigation/screens/one.tsx.ejs +2 -97
- package/build/templates/packages/react-navigation/screens/overview.tsx.ejs +37 -182
- 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/types/types.d.ts +3 -2
- package/build/types/utilities/configureProjectFiles.d.ts +1 -1
- package/build/types/utilities/generateProjectFiles.d.ts +1 -1
- package/build/types.js +3 -2
- package/build/utilities/configureProjectFiles.js +86 -19
- package/build/utilities/generateProjectFiles.js +8 -4
- package/build/utilities/runCLI.js +24 -8
- package/build/utilities/showHelp.js +4 -1
- package/package.json +66 -66
- package/build/templates/base/.prettierrc +0 -7
- package/build/templates/packages/expo-router/drawer/components/edit-screen-info.tsx.ejs +0 -153
- package/build/templates/packages/expo-router/index.js +0 -4
- package/build/templates/packages/expo-router/index.ts +0 -1
- 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
- package/build/types/templates/packages/expo-router/index.d.ts +0 -1
- /package/build/templates/packages/expo-router/drawer/app/{[...unmatched].tsx.ejs → +not-found.tsx.ejs} +0 -0
- /package/build/templates/packages/expo-router/stack/app/{[...unmatched].tsx.ejs → +not-found.tsx.ejs} +0 -0
- /package/build/templates/packages/expo-router/tabs/app/{[...unmatched].tsx.ejs → +not-found.tsx.ejs} +0 -0
|
@@ -1,96 +1,42 @@
|
|
|
1
|
-
import FontAwesome from '@expo/vector-icons/FontAwesome';
|
|
2
1
|
import { createBottomTabNavigator } from '@react-navigation/bottom-tabs';
|
|
3
2
|
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
|
-
<% } %>
|
|
12
3
|
|
|
13
4
|
import { RootStackParamList } from '.';
|
|
5
|
+
import { HeaderButton } from '../components/HeaderButton';
|
|
6
|
+
import { TabBarIcon } from '../components/TabBarIcon';
|
|
14
7
|
import One from '../screens/one';
|
|
15
8
|
import Two from '../screens/two';
|
|
16
9
|
|
|
17
10
|
const Tab = createBottomTabNavigator();
|
|
18
11
|
|
|
19
|
-
function TabBarIcon(props: {
|
|
20
|
-
name: React.ComponentProps<typeof FontAwesome>['name'];
|
|
21
|
-
color: string;
|
|
22
|
-
}) {
|
|
23
|
-
<% if (props.stylingPackage?.name === 'unistyles') {%>
|
|
24
|
-
const { styles } = useStyles(stylesheet)
|
|
25
|
-
<% } %>
|
|
26
|
-
return <FontAwesome size={28} style={styles.tabBarIcon} {...props} />;
|
|
27
|
-
}
|
|
28
|
-
|
|
29
12
|
type Props = StackScreenProps<RootStackParamList, 'TabNavigator'>;
|
|
30
13
|
|
|
31
14
|
export default function TabLayout({ navigation }: Props) {
|
|
32
|
-
<% if (props.stylingPackage?.name === 'unistyles') {%>
|
|
33
|
-
const { styles } = useStyles(stylesheet)
|
|
34
|
-
<% } %>
|
|
35
|
-
|
|
36
15
|
return (
|
|
37
16
|
<Tab.Navigator
|
|
38
17
|
screenOptions={{
|
|
39
18
|
tabBarActiveTintColor: 'black',
|
|
40
|
-
|
|
19
|
+
<% if (props.navigationPackage?.options.type === 'drawer + tabs') { %>
|
|
41
20
|
headerShown: false,
|
|
42
21
|
<% } %>
|
|
43
22
|
}}>
|
|
44
23
|
<Tab.Screen
|
|
45
|
-
name=
|
|
24
|
+
name="One"
|
|
46
25
|
component={One}
|
|
47
26
|
options={{
|
|
48
27
|
title: 'Tab One',
|
|
49
|
-
tabBarIcon: ({ color }) => <TabBarIcon name=
|
|
50
|
-
|
|
51
|
-
headerRight: () => (
|
|
52
|
-
<Pressable onPress={() => navigation.navigate('Modal')}>
|
|
53
|
-
{({ pressed }) => (
|
|
54
|
-
<FontAwesome
|
|
55
|
-
name='info-circle'
|
|
56
|
-
size={25}
|
|
57
|
-
color='gray'
|
|
58
|
-
style={[styles.headerRight, { opacity: pressed ? 0.5 : 1 }]}
|
|
59
|
-
/>
|
|
60
|
-
)}
|
|
61
|
-
</Pressable>
|
|
62
|
-
)
|
|
63
|
-
<% } %>
|
|
28
|
+
tabBarIcon: ({ color }) => <TabBarIcon name="code" color={color} />,
|
|
29
|
+
headerRight: () => <HeaderButton onPress={() => navigation.navigate('Modal')} />,
|
|
64
30
|
}}
|
|
65
31
|
/>
|
|
66
32
|
<Tab.Screen
|
|
67
|
-
name=
|
|
33
|
+
name="Two"
|
|
68
34
|
component={Two}
|
|
69
35
|
options={{
|
|
70
36
|
title: 'Tab Two',
|
|
71
|
-
tabBarIcon: ({ color }) => <TabBarIcon name=
|
|
37
|
+
tabBarIcon: ({ color }) => <TabBarIcon name="code" color={color} />,
|
|
72
38
|
}}
|
|
73
39
|
/>
|
|
74
40
|
</Tab.Navigator>
|
|
75
41
|
);
|
|
76
42
|
}
|
|
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 { %>
|
|
88
|
-
const styles = StyleSheet.create({
|
|
89
|
-
headerRight: {
|
|
90
|
-
marginRight: 15
|
|
91
|
-
},
|
|
92
|
-
tabBarIcon: {
|
|
93
|
-
marginBottom: -3
|
|
94
|
-
}
|
|
95
|
-
});
|
|
96
|
-
<% } %>
|
|
@@ -1,113 +1,27 @@
|
|
|
1
|
-
import { RouteProp, useRoute } from
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
<% } else if (props.stylingPackage?.name === "tamagui") { %>
|
|
5
|
-
import { YStack } from "tamagui";
|
|
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';
|
|
12
|
-
<% } else { %>
|
|
13
|
-
import { View, StyleSheet, Text } from "react-native";
|
|
14
|
-
<% } %>
|
|
15
|
-
import { RootStackParamList } from "../navigation";
|
|
1
|
+
import { RouteProp, useRoute } from '@react-navigation/native';
|
|
2
|
+
import { ScreenContent } from 'components/ScreenContent';
|
|
3
|
+
import { StyleSheet, View } from 'react-native';
|
|
16
4
|
|
|
17
|
-
|
|
5
|
+
import { RootStackParamList } from '../navigation';
|
|
6
|
+
|
|
7
|
+
type DetailsSreenRouteProp = RouteProp<RootStackParamList, 'Details'>;
|
|
18
8
|
|
|
19
9
|
export default function Details() {
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
<% } else if (props.stylingPackage?.name === "tamagui") { %>
|
|
31
|
-
return (
|
|
32
|
-
<Container>
|
|
33
|
-
<Main>
|
|
34
|
-
<YStack>
|
|
35
|
-
<Title>Details</Title>
|
|
36
|
-
<Subtitle>Showing details for user {router.params.name}.</Subtitle>
|
|
37
|
-
</YStack>
|
|
38
|
-
</Main>
|
|
39
|
-
</Container>
|
|
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
|
-
);
|
|
62
|
-
<% } else { %>
|
|
63
|
-
return (
|
|
64
|
-
<View style={styles.container}>
|
|
65
|
-
<View style={styles.main}>
|
|
66
|
-
<Text style={styles.title}>Details</Text>
|
|
67
|
-
<Text style={styles.subtitle}>Showing details for user {router.params.name}.</Text>
|
|
68
|
-
</View>
|
|
69
|
-
</View>
|
|
70
|
-
);
|
|
71
|
-
<% } %>
|
|
10
|
+
const router = useRoute<DetailsSreenRouteProp>();
|
|
11
|
+
|
|
12
|
+
return (
|
|
13
|
+
<View style={styles.container}>
|
|
14
|
+
<ScreenContent
|
|
15
|
+
path="screens/details.tsx"
|
|
16
|
+
title={`Showing details for user ${router.params.name}`}
|
|
17
|
+
/>
|
|
18
|
+
</View>
|
|
19
|
+
);
|
|
72
20
|
}
|
|
73
21
|
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
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
|
-
});
|
|
93
|
-
<% } else if (props.stylingPackage?.name === "stylesheet") { %>
|
|
94
|
-
const styles = StyleSheet.create({
|
|
95
|
-
container: {
|
|
96
|
-
flex: 1,
|
|
97
|
-
padding: 24,
|
|
98
|
-
},
|
|
99
|
-
main: {
|
|
100
|
-
flex: 1,
|
|
101
|
-
maxWidth: 960,
|
|
102
|
-
marginHorizontal: "auto",
|
|
103
|
-
},
|
|
104
|
-
title: {
|
|
105
|
-
fontSize: 64,
|
|
106
|
-
fontWeight: "bold",
|
|
107
|
-
},
|
|
108
|
-
subtitle: {
|
|
109
|
-
fontSize: 36,
|
|
110
|
-
color: "#38434D",
|
|
111
|
-
},
|
|
112
|
-
});
|
|
113
|
-
<% } %>
|
|
22
|
+
export const styles = StyleSheet.create({
|
|
23
|
+
container: {
|
|
24
|
+
flex: 1,
|
|
25
|
+
padding: 24,
|
|
26
|
+
},
|
|
27
|
+
});
|
|
@@ -1,84 +1,5 @@
|
|
|
1
|
-
|
|
2
|
-
import { Text, View } from 'react-native';
|
|
3
|
-
import EditScreenInfo from '../components/edit-screen-info';
|
|
4
|
-
<% } else if (props.stylingPackage?.name === 'tamagui') { %>
|
|
5
|
-
import { YStack, H2, Separator, Theme } from 'tamagui';
|
|
6
|
-
<% } else if (props.stylingPackage?.name === 'restyle') { %>
|
|
7
|
-
import { Box, Text } from 'theme';
|
|
8
|
-
<% } else if (props.stylingPackage?.name === 'unistyles') { %>
|
|
9
|
-
import { useStyles } from 'react-native-unistyles'
|
|
10
|
-
import { Text, View } from 'react-native';
|
|
11
|
-
<% } else if (props.stylingPackage?.name === 'stylesheet') { %>
|
|
12
|
-
import { StyleSheet, Text, View } from 'react-native';
|
|
13
|
-
<% } %>
|
|
1
|
+
import { ScreenContent } from 'components/ScreenContent';
|
|
14
2
|
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
const { theme } = useStyles();
|
|
18
|
-
|
|
19
|
-
return (
|
|
20
|
-
<View style={theme.components.container}>
|
|
21
|
-
<Text style={theme.components.title}>News</Text>
|
|
22
|
-
<View style={theme.components.separator} />
|
|
23
|
-
</View>
|
|
24
|
-
);
|
|
25
|
-
<% } else if (props.stylingPackage?.name === 'nativewind') { %>
|
|
26
|
-
return (
|
|
27
|
-
<View className={styles.container}>
|
|
28
|
-
<Text className={styles.title}>Home</Text>
|
|
29
|
-
<View className={styles.separator} />
|
|
30
|
-
<EditScreenInfo path='app/(tabs)/index.tsx' />
|
|
31
|
-
</View>
|
|
32
|
-
);
|
|
33
|
-
<% } else if (props.stylingPackage?.name === 'tamagui') { %>
|
|
34
|
-
return (
|
|
35
|
-
<Theme name='light'>
|
|
36
|
-
<YStack flex={1} alignItems='center' justifyContent='center'>
|
|
37
|
-
<H2>Home</H2>
|
|
38
|
-
<Separator />
|
|
39
|
-
</YStack>
|
|
40
|
-
</Theme>
|
|
41
|
-
);
|
|
42
|
-
<% } else if (props.stylingPackage?.name === 'restyle') { %>
|
|
43
|
-
return (
|
|
44
|
-
<Box flex={1} alignItems='center' justifyContent='center'>
|
|
45
|
-
<Text variant='title'>Home</Text>
|
|
46
|
-
<Box height={1} marginVertical='l_32' width='80%' />
|
|
47
|
-
</Box>
|
|
48
|
-
);
|
|
49
|
-
<% } else { %>
|
|
50
|
-
return (
|
|
51
|
-
<View style={styles.container}>
|
|
52
|
-
<Text style={styles.title}>Home</Text>
|
|
53
|
-
<View style={styles.separator} />
|
|
54
|
-
</View>
|
|
55
|
-
);
|
|
56
|
-
<% } %>
|
|
3
|
+
export default function Home() {
|
|
4
|
+
return <ScreenContent path="screens/home.tsx" title="Home" />;
|
|
57
5
|
}
|
|
58
|
-
|
|
59
|
-
export default Page;
|
|
60
|
-
|
|
61
|
-
<% if (props.stylingPackage?.name === 'nativewind') { %>
|
|
62
|
-
const styles = {
|
|
63
|
-
container: `items-center flex-1 justify-center`,
|
|
64
|
-
separator: `h-[1px] my-7 w-4/5 bg-gray-200`,
|
|
65
|
-
title: `text-xl font-bold`
|
|
66
|
-
};
|
|
67
|
-
<% } else if (props.stylingPackage?.name === 'stylesheet') { %>
|
|
68
|
-
const styles = StyleSheet.create({
|
|
69
|
-
container: {
|
|
70
|
-
alignItems: 'center',
|
|
71
|
-
flex: 1,
|
|
72
|
-
justifyContent: 'center',
|
|
73
|
-
},
|
|
74
|
-
separator: {
|
|
75
|
-
height: 1,
|
|
76
|
-
marginVertical: 30,
|
|
77
|
-
width: '80%',
|
|
78
|
-
},
|
|
79
|
-
title: {
|
|
80
|
-
fontSize: 20,
|
|
81
|
-
fontWeight: 'bold',
|
|
82
|
-
}
|
|
83
|
-
});
|
|
84
|
-
<% } %>
|
|
@@ -1,108 +1,20 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
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, 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';
|
|
12
|
-
<% } else { %>
|
|
13
|
-
import { Platform, StyleSheet, Text, View } from "react-native";
|
|
14
|
-
<% } %>
|
|
15
|
-
import { StatusBar } from "expo-status-bar";
|
|
1
|
+
import { ScreenContent } from 'components/ScreenContent';
|
|
2
|
+
import { StatusBar } from 'expo-status-bar';
|
|
3
|
+
import { Platform } from 'react-native';
|
|
16
4
|
|
|
17
|
-
|
|
5
|
+
<% if (props.internalizationPackage?.name === "i18next") { %>
|
|
6
|
+
import { InternalizationExample } from 'components/InternalizationExample';
|
|
7
|
+
<% } %>
|
|
18
8
|
|
|
19
9
|
export default function Modal() {
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
return (
|
|
31
|
-
<Theme name="light">
|
|
32
|
-
<YStack flex={1} alignItems="center" justifyContent="center">
|
|
33
|
-
<StatusBar style={Platform.OS === "ios" ? "light" : "auto"} />
|
|
34
|
-
<Paragraph>Modal</Paragraph>
|
|
35
|
-
<Separator />
|
|
36
|
-
<EditScreenInfo path="src/screens/modal.tsx" />
|
|
37
|
-
</YStack>
|
|
38
|
-
</Theme>
|
|
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
|
-
);
|
|
61
|
-
<% } else { %>
|
|
62
|
-
return (
|
|
63
|
-
<View style={styles.container}>
|
|
64
|
-
<StatusBar style={Platform.OS === "ios" ? "light" : "auto"} />
|
|
65
|
-
<Text style={styles.title}>Modal</Text>
|
|
66
|
-
<View style={styles.separator} />
|
|
67
|
-
<EditScreenInfo path="src/screens/modal.tsx" />
|
|
68
|
-
</View>
|
|
69
|
-
);
|
|
70
|
-
<% } %>
|
|
10
|
+
return (
|
|
11
|
+
<>
|
|
12
|
+
<ScreenContent path="screens/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
|
+
);
|
|
71
20
|
}
|
|
72
|
-
|
|
73
|
-
<% if (props.stylingPackage?.name === "nativewind") { %>
|
|
74
|
-
const styles = {
|
|
75
|
-
container: "items-center flex-1 justify-center",
|
|
76
|
-
separator: "h-[1px] my-7 w-4/5 bg-gray-200",
|
|
77
|
-
title: "text-xl font-bold"
|
|
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
|
-
}));
|
|
89
|
-
<% } else if (props.stylingPackage?.name === "stylesheet") { %>
|
|
90
|
-
const styles = StyleSheet.create({
|
|
91
|
-
container: {
|
|
92
|
-
alignItems: "center",
|
|
93
|
-
flex: 1,
|
|
94
|
-
justifyContent: "center"
|
|
95
|
-
},
|
|
96
|
-
separator: {
|
|
97
|
-
backgroundColor: "gray",
|
|
98
|
-
height: 1,
|
|
99
|
-
marginVertical: 30,
|
|
100
|
-
opacity: 0.25,
|
|
101
|
-
width: "80%",
|
|
102
|
-
},
|
|
103
|
-
title: {
|
|
104
|
-
fontSize: 20,
|
|
105
|
-
fontWeight: "bold"
|
|
106
|
-
}
|
|
107
|
-
});
|
|
108
|
-
<% } %>
|
|
@@ -1,100 +1,5 @@
|
|
|
1
|
-
|
|
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, makeStyles } 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 { %>
|
|
11
|
-
import { StyleSheet, Text, View } from "react-native";
|
|
12
|
-
<% } %>
|
|
13
|
-
|
|
14
|
-
import EditScreenInfo from "../components/edit-screen-info";
|
|
1
|
+
import { ScreenContent } from 'components/ScreenContent';
|
|
15
2
|
|
|
16
3
|
export default function TabOneScreen() {
|
|
17
|
-
|
|
18
|
-
return (
|
|
19
|
-
<View className={styles.container}>
|
|
20
|
-
<Text className={styles.title}>Tab One</Text>
|
|
21
|
-
<View className={styles.separator} />
|
|
22
|
-
<EditScreenInfo path="src/screens/one.tsx" />
|
|
23
|
-
</View>
|
|
24
|
-
);
|
|
25
|
-
<% } else if (props.stylingPackage?.name === "tamagui") { %>
|
|
26
|
-
return (
|
|
27
|
-
<Theme name="light">
|
|
28
|
-
<YStack flex={1} alignItems="center" justifyContent="center">
|
|
29
|
-
<H2>Tab One</H2>
|
|
30
|
-
<Separator />
|
|
31
|
-
<EditScreenInfo path="src/screens/one.tsx" />
|
|
32
|
-
</YStack>
|
|
33
|
-
</Theme>
|
|
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
|
-
);
|
|
54
|
-
<% } else { %>
|
|
55
|
-
return (
|
|
56
|
-
<View style={styles.container}>
|
|
57
|
-
<Text style={styles.title}>Tab One</Text>
|
|
58
|
-
<View style={styles.separator} />
|
|
59
|
-
<EditScreenInfo path="src/screens/one.tsx" />
|
|
60
|
-
</View>
|
|
61
|
-
);
|
|
62
|
-
<% } %>
|
|
4
|
+
return <ScreenContent path="screens/one.tsx" title="Tab One" />;
|
|
63
5
|
}
|
|
64
|
-
|
|
65
|
-
<% if (props.stylingPackage?.name === "nativewind") { %>
|
|
66
|
-
const styles = {
|
|
67
|
-
container: "items-center flex-1 justify-center",
|
|
68
|
-
separator: "h-[1px] my-7 w-4/5 bg-gray-200",
|
|
69
|
-
title: "text-xl font-bold"
|
|
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
|
-
}));
|
|
81
|
-
<% } else if (props.stylingPackage?.name === "stylesheet") { %>
|
|
82
|
-
const styles = StyleSheet.create({
|
|
83
|
-
container: {
|
|
84
|
-
alignItems: "center",
|
|
85
|
-
flex: 1,
|
|
86
|
-
justifyContent: "center",
|
|
87
|
-
},
|
|
88
|
-
separator: {
|
|
89
|
-
backgroundColor: "gray",
|
|
90
|
-
height: 1,
|
|
91
|
-
marginVertical: 30,
|
|
92
|
-
opacity: 0.25,
|
|
93
|
-
width: "80%",
|
|
94
|
-
},
|
|
95
|
-
title: {
|
|
96
|
-
fontSize: 20,
|
|
97
|
-
fontWeight: "bold",
|
|
98
|
-
}
|
|
99
|
-
});
|
|
100
|
-
<% } %>
|