create-expo-stack 2.1.20 → 2.1.22
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/bin/create-expo-stack.js +2 -0
- package/build/cli.js +6 -4
- package/build/commands/create-expo-stack.js +51 -19
- package/build/constants.js +4 -4
- package/build/templates/base/package.json.ejs +8 -1
- package/build/templates/packages/expo-router/expo-env.d.ts +1 -1
- package/build/templates/packages/expo-router/index.js +1 -1
- package/build/templates/packages/expo-router/index.ts +1 -1
- package/build/templates/packages/expo-router/metro.config.js +3 -3
- package/build/templates/packages/expo-router/stack/app/_layout.tsx.ejs +69 -71
- package/build/templates/packages/expo-router/stack/app/details.tsx.ejs +56 -56
- package/build/templates/packages/expo-router/stack/app/index.tsx.ejs +97 -97
- package/build/templates/packages/nativewind/app.d.ts +1 -1
- package/build/templates/packages/react-navigation/App.tsx.ejs +27 -27
- package/build/templates/packages/react-navigation/navigation/index.tsx.ejs +109 -95
- package/build/templates/packages/react-navigation/screens/details.tsx.ejs +60 -57
- package/build/templates/packages/react-navigation/screens/overview.tsx.ejs +98 -95
- package/build/templates/packages/tamagui/tamagui.config.ts.ejs +48 -42
- package/build/types/cli.d.ts +4 -1
- package/build/types/constants.d.ts +1 -1
- package/build/types/templates/packages/expo-router/index.d.ts +1 -1
- package/build/types/types.d.ts +2 -2
- package/build/types/utilities/configureProjectFiles.d.ts +2 -2
- package/build/types/utilities/generateProjectFiles.d.ts +2 -2
- package/build/types/utilities/getPackageManager.d.ts +2 -2
- package/build/types/utilities/index.d.ts +9 -9
- package/build/types/utilities/printOutput.d.ts +2 -2
- package/build/types/utilities/renderTitle.d.ts +1 -1
- package/build/types/utilities/runCLI.d.ts +2 -2
- package/build/types/utilities/runIgnite.d.ts +1 -1
- package/build/types/utilities/usePackage.d.ts +1 -1
- package/build/types.js +11 -2
- package/build/utilities/bumpVersion.js +1 -1
- package/build/utilities/configureProjectFiles.js +8 -12
- package/build/utilities/generateProjectFiles.js +5 -5
- package/build/utilities/getPackageManager.js +9 -10
- package/build/utilities/index.js +1 -1
- package/build/utilities/printOutput.js +4 -3
- package/build/utilities/renderTitle.js +15 -13
- package/build/utilities/runCLI.js +14 -14
- package/build/utilities/runIgnite.js +1 -1
- package/build/utilities/showHelp.js +29 -29
- package/build/utilities/usePackage.js +1 -1
- package/package.json +36 -48
- package/LICENSE +0 -21
- package/bin/create-expo-stack +0 -21
- package/build/extensions/cli-extension.js +0 -17
- package/build/types/extensions/cli-extension.d.ts +0 -1
- package/docs/commands.md +0 -3
- package/docs/plugins.md +0 -49
- package/readme.md +0 -104
|
@@ -1,109 +1,109 @@
|
|
|
1
1
|
<% if (props.stylingPackage?.name === "nativewind") { %>
|
|
2
|
-
|
|
2
|
+
import { Text, TouchableOpacity, View } from "react-native";
|
|
3
3
|
<% } else if (props.stylingPackage?.name === "tamagui") { %>
|
|
4
|
-
|
|
5
|
-
|
|
4
|
+
import { YStack } from "tamagui";
|
|
5
|
+
import { Container, Main, Title, Subtitle, Button, ButtonText } from '../tamagui.config';
|
|
6
6
|
<% } else { %>
|
|
7
|
-
|
|
7
|
+
import { StyleSheet, Text, TouchableOpacity, View } from "react-native";
|
|
8
8
|
<% } %>
|
|
9
9
|
import { Link } from "expo-router";
|
|
10
10
|
|
|
11
11
|
export default function Page() {
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
12
|
+
return (
|
|
13
|
+
<% if (props.stylingPackage?.name === "nativewind") { %>
|
|
14
|
+
<View className={styles.container}>
|
|
15
|
+
<View className={styles.main}>
|
|
16
|
+
<View>
|
|
17
|
+
<Text className={styles.title}>Hello World</Text>
|
|
18
|
+
<Text className={styles.subtitle}>This is the first page of your app.</Text>
|
|
19
|
+
</View>
|
|
20
|
+
<Link href={{ pathname: "/details", params: { name: "Dan" } }} asChild>
|
|
21
|
+
<TouchableOpacity className={styles.button} >
|
|
22
|
+
<Text className={styles.buttonText}>Show Details</Text>
|
|
23
|
+
</TouchableOpacity>
|
|
24
|
+
</Link>
|
|
25
|
+
</View>
|
|
26
|
+
</View>
|
|
27
|
+
<% } else if (props.stylingPackage?.name === "tamagui") { %>
|
|
28
|
+
<Container>
|
|
29
|
+
<Main>
|
|
30
|
+
<YStack>
|
|
31
|
+
<Title>Hello World</Title>
|
|
32
|
+
<Subtitle>This is the first page of your app.</Subtitle>
|
|
33
|
+
</YStack>
|
|
34
|
+
<Link href={{ pathname: "/details", params: { name: "Dan" } }} asChild>
|
|
35
|
+
<Button><ButtonText>Show Details</ButtonText></Button>
|
|
36
|
+
</Link>
|
|
37
|
+
</Main>
|
|
38
|
+
</Container>
|
|
39
|
+
<% } else { %>
|
|
40
|
+
<View style={styles.container}>
|
|
41
|
+
<View style={styles.main}>
|
|
42
|
+
<View>
|
|
43
|
+
<Text style={styles.title}>Hello World</Text>
|
|
44
|
+
<Text style={styles.subtitle}>This is the first page of your app.</Text>
|
|
45
|
+
</View>
|
|
46
|
+
<Link href={{ pathname: "/details", params: { name: "Dan" } }} asChild>
|
|
47
|
+
<TouchableOpacity style={styles.button} >
|
|
48
|
+
<Text style={styles.buttonText}>Show Details</Text>
|
|
49
|
+
</TouchableOpacity>
|
|
50
|
+
</Link>
|
|
51
|
+
</View>
|
|
52
|
+
</View>
|
|
53
|
+
<% } %>
|
|
54
|
+
);
|
|
55
55
|
}
|
|
56
56
|
|
|
57
57
|
<% if (props.stylingPackage?.name === "nativewind") { %>
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
58
|
+
const styles = {
|
|
59
|
+
button: "items-center bg-indigo-500 rounded-[28px] shadow-md p-4",
|
|
60
|
+
buttonText: "text-white text-lg font-semibold text-center",
|
|
61
|
+
container: "flex-1 p-6",
|
|
62
|
+
main: "flex-1 max-w-[960] justify-between",
|
|
63
|
+
title: "text-[64px] font-bold",
|
|
64
|
+
subtitle: "text-4xl text-gray-700",
|
|
65
|
+
};
|
|
66
66
|
<% } else if (props.stylingPackage?.name === "stylesheet") { %>
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
67
|
+
const styles = StyleSheet.create({
|
|
68
|
+
button: {
|
|
69
|
+
alignItems: "center",
|
|
70
|
+
backgroundColor: "#6366F1",
|
|
71
|
+
borderRadius: 24,
|
|
72
|
+
elevation: 5,
|
|
73
|
+
flexDirection: "row",
|
|
74
|
+
justifyContent: "center",
|
|
75
|
+
padding: 16,
|
|
76
|
+
shadowColor: "#000",
|
|
77
|
+
shadowOffset: {
|
|
78
|
+
height: 2,
|
|
79
|
+
width: 0
|
|
80
|
+
},
|
|
81
|
+
shadowOpacity: 0.25,
|
|
82
|
+
shadowRadius: 3.84
|
|
83
|
+
},
|
|
84
|
+
buttonText: {
|
|
85
|
+
color: "#FFFFFF",
|
|
86
|
+
fontSize: 16,
|
|
87
|
+
fontWeight: "600",
|
|
88
|
+
textAlign: "center",
|
|
89
|
+
},
|
|
90
|
+
container: {
|
|
91
|
+
flex: 1,
|
|
92
|
+
padding: 24,
|
|
93
|
+
},
|
|
94
|
+
main: {
|
|
95
|
+
flex: 1,
|
|
96
|
+
maxWidth: 960,
|
|
97
|
+
marginHorizontal: "auto",
|
|
98
|
+
justifyContent: "space-between",
|
|
99
|
+
},
|
|
100
|
+
title: {
|
|
101
|
+
fontSize: 64,
|
|
102
|
+
fontWeight: "bold",
|
|
103
|
+
},
|
|
104
|
+
subtitle: {
|
|
105
|
+
color: "#38434D",
|
|
106
|
+
fontSize: 36,
|
|
107
|
+
}
|
|
108
|
+
});
|
|
109
109
|
<% } %>
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
// @ts-ignore
|
|
2
|
-
/// <reference types="nativewind/types" />
|
|
2
|
+
/// <reference types="nativewind/types" />
|
|
@@ -1,39 +1,39 @@
|
|
|
1
1
|
import "react-native-gesture-handler";
|
|
2
2
|
<% if (props.stylingPackage?.name === "tamagui") { %>
|
|
3
|
-
import React, { useEffect } from "react";
|
|
4
|
-
import { TamaguiProvider } from 'tamagui';
|
|
5
|
-
import * as SplashScreen from 'expo-splash-screen';
|
|
6
|
-
import { useFonts } from 'expo-font';
|
|
3
|
+
import React, { useEffect } from "react";
|
|
4
|
+
import { TamaguiProvider } from 'tamagui';
|
|
5
|
+
import * as SplashScreen from 'expo-splash-screen';
|
|
6
|
+
import { useFonts } from 'expo-font';
|
|
7
7
|
|
|
8
|
-
import config from './tamagui.config'
|
|
8
|
+
import config from './tamagui.config'
|
|
9
9
|
|
|
10
|
-
SplashScreen.preventAutoHideAsync();
|
|
10
|
+
SplashScreen.preventAutoHideAsync();
|
|
11
11
|
<% } %>
|
|
12
12
|
import RootStack from "./src/navigation";
|
|
13
13
|
|
|
14
14
|
export default function App() {
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
15
|
+
<% if (props.stylingPackage?.name === "tamagui") { %>
|
|
16
|
+
const [loaded] = useFonts({
|
|
17
|
+
Inter: require("@tamagui/font-inter/otf/Inter-Medium.otf"),
|
|
18
|
+
InterBold: require("@tamagui/font-inter/otf/Inter-Bold.otf"),
|
|
19
|
+
});
|
|
20
20
|
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
21
|
+
useEffect(() => {
|
|
22
|
+
if (loaded) {
|
|
23
|
+
SplashScreen.hideAsync();
|
|
24
|
+
}
|
|
25
|
+
}, [loaded])
|
|
26
26
|
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
27
|
+
if (!loaded) {
|
|
28
|
+
return null;
|
|
29
|
+
}
|
|
30
30
|
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
31
|
+
return (
|
|
32
|
+
<TamaguiProvider config={config}>
|
|
33
|
+
<RootStack />
|
|
34
|
+
</TamaguiProvider>
|
|
35
|
+
);
|
|
36
|
+
<% } else { %>
|
|
37
|
+
return <RootStack />;
|
|
38
|
+
<% } %>
|
|
39
39
|
}
|
|
@@ -1,106 +1,120 @@
|
|
|
1
1
|
<% if (props.navigationPackage?.options.type === 'stack') { %>
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
2
|
+
import { Feather } from "@expo/vector-icons";
|
|
3
|
+
import { NavigationContainer } from "@react-navigation/native";
|
|
4
|
+
import { createStackNavigator } from "@react-navigation/stack";
|
|
5
|
+
<% if (props.stylingPackage?.name === "nativewind") { %>
|
|
6
|
+
import { Text, View } from "react-native";
|
|
7
|
+
<% } else if (props.stylingPackage?.name === "tamagui") { %>
|
|
8
|
+
import { Button, Text } from "tamagui";
|
|
9
|
+
<% } else { %>
|
|
10
|
+
import { Text, View, StyleSheet } from "react-native";
|
|
11
|
+
<% } %>
|
|
12
12
|
|
|
13
|
-
|
|
14
|
-
|
|
13
|
+
import Overview from "../screens/overview";
|
|
14
|
+
import Details from "../screens/details";
|
|
15
15
|
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
16
|
+
export type RootStackParamList = {
|
|
17
|
+
Overview: undefined;
|
|
18
|
+
Details: { name: string };
|
|
19
|
+
};
|
|
20
20
|
|
|
21
|
-
|
|
21
|
+
const Stack = createStackNavigator<RootStackParamList>();
|
|
22
22
|
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
23
|
+
export default function RootStack() {
|
|
24
|
+
return (
|
|
25
|
+
<NavigationContainer>
|
|
26
|
+
<Stack.Navigator initialRouteName="Overview">
|
|
27
|
+
<Stack.Screen name="Overview" component={Overview} />
|
|
28
|
+
<Stack.Screen
|
|
29
|
+
name="Details"
|
|
30
|
+
component={Details}
|
|
31
|
+
<% if (props.stylingPackage?.name === "nativewind") { %>
|
|
32
|
+
options={({ navigation }) => ({
|
|
33
|
+
headerLeft: () => (
|
|
34
|
+
<View className={styles.backButton}>
|
|
35
|
+
<Feather name="chevron-left" size={16} color="#007AFF" />
|
|
36
|
+
<Text className={styles.backButtonText} onPress={navigation.goBack}>Back</Text>
|
|
37
|
+
</View>
|
|
38
|
+
)
|
|
39
|
+
})}
|
|
40
|
+
<% } else if (props.stylingPackage?.name === "tamagui") { %>
|
|
41
|
+
options={({ navigation }) => ({
|
|
42
|
+
headerLeft: () => (
|
|
43
|
+
<Button
|
|
44
|
+
unstyled
|
|
45
|
+
flexDirection="row"
|
|
46
|
+
backgroundColor="transparent"
|
|
47
|
+
pressStyle={{ opacity: 0.5 }}
|
|
48
|
+
paddingLeft={20}
|
|
49
|
+
onPress={navigation.goBack}
|
|
50
|
+
icon={<Feather name="chevron-left" size={16} color="#007AFF" />}
|
|
51
|
+
>
|
|
52
|
+
<Text color="#007AFF">Back</Text>
|
|
53
|
+
</Button>
|
|
54
|
+
),
|
|
55
|
+
})}
|
|
56
|
+
<% } else { %>
|
|
57
|
+
options={({ navigation }) => ({
|
|
58
|
+
headerLeft: () => (
|
|
59
|
+
<View style={styles.backButton}>
|
|
60
|
+
<Feather name="chevron-left" size={16} color="#007AFF" />
|
|
61
|
+
<Text style={styles.backButtonText} onPress={navigation.goBack}>Back</Text>
|
|
62
|
+
</View>
|
|
63
|
+
)
|
|
64
|
+
})}
|
|
65
|
+
<% } %>
|
|
66
|
+
/>
|
|
67
|
+
</Stack.Navigator>
|
|
68
|
+
</NavigationContainer>
|
|
69
|
+
);
|
|
70
|
+
}
|
|
71
|
+
|
|
72
|
+
<% if (props.stylingPackage?.name === "nativewind") { %>
|
|
73
|
+
const styles = {
|
|
74
|
+
backButton: "flex-row",
|
|
75
|
+
backButtonText: "text-blue-500 ml-1"
|
|
76
|
+
};
|
|
77
|
+
<% } else if (props.stylingPackage?.name === "stylesheet") { %>
|
|
78
|
+
const styles = StyleSheet.create({
|
|
79
|
+
backButton: {
|
|
80
|
+
flexDirection: "row"
|
|
81
|
+
},
|
|
82
|
+
backButtonText: {
|
|
83
|
+
color: "#007AFF",
|
|
84
|
+
marginLeft: 4
|
|
85
|
+
}
|
|
86
|
+
});
|
|
87
|
+
<% } %>
|
|
78
88
|
<% } else { %>
|
|
79
|
-
|
|
80
|
-
|
|
89
|
+
import { NavigationContainer } from "@react-navigation/native";
|
|
90
|
+
import { createStackNavigator } from "@react-navigation/stack";
|
|
81
91
|
|
|
82
|
-
|
|
83
|
-
|
|
92
|
+
import Modal from "../screens/modal";
|
|
93
|
+
import TabNavigator from "./tab-navigator";
|
|
84
94
|
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
95
|
+
export type RootStackParamList = {
|
|
96
|
+
TabNavigator: undefined;
|
|
97
|
+
Modal: undefined;
|
|
98
|
+
};
|
|
89
99
|
|
|
90
|
-
|
|
100
|
+
const Stack = createStackNavigator<RootStackParamList>();
|
|
91
101
|
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
102
|
+
export default function RootStack() {
|
|
103
|
+
return (
|
|
104
|
+
<NavigationContainer>
|
|
105
|
+
<Stack.Navigator initialRouteName="TabNavigator">
|
|
106
|
+
<Stack.Screen
|
|
107
|
+
name="TabNavigator"
|
|
108
|
+
component={TabNavigator}
|
|
109
|
+
options={{ headerShown: false }}
|
|
110
|
+
/>
|
|
111
|
+
<Stack.Screen
|
|
112
|
+
name="Modal"
|
|
113
|
+
component={Modal}
|
|
114
|
+
options={{ presentation: "modal", headerLeft: null }}
|
|
115
|
+
/>
|
|
116
|
+
</Stack.Navigator>
|
|
117
|
+
</NavigationContainer>
|
|
118
|
+
);
|
|
119
|
+
}
|
|
106
120
|
<% } %>
|
|
@@ -1,72 +1,75 @@
|
|
|
1
1
|
import { RouteProp, useRoute } from "@react-navigation/native";
|
|
2
2
|
<% if (props.stylingPackage?.name === "nativewind") { %>
|
|
3
|
-
|
|
3
|
+
import { View, Text } from "react-native";
|
|
4
4
|
<% } else if (props.stylingPackage?.name === "tamagui") { %>
|
|
5
|
-
|
|
5
|
+
import { YStack } from "tamagui";
|
|
6
|
+
import { Container, Main, Subtitle, Title } from "../../tamagui.config";
|
|
6
7
|
<% } else { %>
|
|
7
|
-
|
|
8
|
+
import { View, StyleSheet, Text } from "react-native";
|
|
8
9
|
<% } %>
|
|
9
10
|
import { RootStackParamList } from "../navigation";
|
|
10
11
|
|
|
11
12
|
type DetailsSreenRouteProp = RouteProp<RootStackParamList, "Details">;
|
|
12
13
|
|
|
13
14
|
export default function Details() {
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
15
|
+
const router = useRoute<DetailsSreenRouteProp>();
|
|
16
|
+
<% if (props.stylingPackage?.name === "nativewind") { %>
|
|
17
|
+
return (
|
|
18
|
+
<View className={styles.container}>
|
|
19
|
+
<View className={styles.main}>
|
|
20
|
+
<Text className={styles.title}>Details</Text>
|
|
21
|
+
<Text className={styles.subtitle}>Showing details for user {router.params.name}.</Text>
|
|
22
|
+
</View>
|
|
23
|
+
</View>
|
|
24
|
+
);
|
|
25
|
+
<% } else if (props.stylingPackage?.name === "tamagui") { %>
|
|
26
|
+
return (
|
|
27
|
+
<Container>
|
|
28
|
+
<Main>
|
|
29
|
+
<YStack>
|
|
30
|
+
<Title>Details</Title>
|
|
31
|
+
<Subtitle>Showing details for user {router.params.name}.</Subtitle>
|
|
32
|
+
</YStack>
|
|
33
|
+
</Main>
|
|
34
|
+
</Container>
|
|
35
|
+
);
|
|
36
|
+
<% } else { %>
|
|
37
|
+
return (
|
|
38
|
+
<View style={styles.container}>
|
|
39
|
+
<View style={styles.main}>
|
|
40
|
+
<Text style={styles.title}>Details</Text>
|
|
41
|
+
<Text style={styles.subtitle}>Showing details for user {router.params.name}.</Text>
|
|
42
|
+
</View>
|
|
43
|
+
</View>
|
|
44
|
+
);
|
|
45
|
+
<% } %>
|
|
43
46
|
}
|
|
44
47
|
|
|
45
48
|
<% if (props.stylingPackage?.name === "nativewind") { %>
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
49
|
+
const styles = {
|
|
50
|
+
container: "flex-1 p-6",
|
|
51
|
+
main: "flex-1 max-w-[960]",
|
|
52
|
+
title: "text-[64px] font-bold",
|
|
53
|
+
subtitle: "text-4xl text-gray-700",
|
|
54
|
+
};
|
|
52
55
|
<% } else if (props.stylingPackage?.name === "stylesheet") { %>
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
56
|
+
const styles = StyleSheet.create({
|
|
57
|
+
container: {
|
|
58
|
+
flex: 1,
|
|
59
|
+
padding: 24,
|
|
60
|
+
},
|
|
61
|
+
main: {
|
|
62
|
+
flex: 1,
|
|
63
|
+
maxWidth: 960,
|
|
64
|
+
marginHorizontal: "auto",
|
|
65
|
+
},
|
|
66
|
+
title: {
|
|
67
|
+
fontSize: 64,
|
|
68
|
+
fontWeight: "bold",
|
|
69
|
+
},
|
|
70
|
+
subtitle: {
|
|
71
|
+
fontSize: 36,
|
|
72
|
+
color: "#38434D",
|
|
73
|
+
},
|
|
74
|
+
});
|
|
72
75
|
<% } %>
|