create-expo-stack 2.4.0-next.43d8ac0 → 2.4.0-next.824bd0e
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/packages/expo-router/drawer/app/(drawer)/index.tsx.ejs +11 -22
- package/build/templates/packages/expo-router/drawer/app/(drawer)/news.tsx.ejs +11 -23
- package/build/templates/packages/expo-router/drawer/app/[...unmatched].tsx.ejs +5 -5
- package/build/templates/packages/expo-router/drawer/app/_layout.tsx.ejs +4 -0
- package/build/templates/packages/expo-router/stack/app/[...unmatched].tsx.ejs +1 -1
- package/build/templates/packages/expo-router/stack/app/_layout.tsx.ejs +4 -0
- package/build/templates/packages/expo-router/stack/app/details.tsx.ejs +35 -28
- package/build/templates/packages/expo-router/stack/app/index.tsx.ejs +29 -43
- package/build/templates/packages/expo-router/tabs/app/(tabs)/_layout.tsx.ejs +9 -9
- package/build/templates/packages/expo-router/tabs/app/(tabs)/index.tsx.ejs +13 -23
- package/build/templates/packages/expo-router/tabs/app/(tabs)/two.tsx.ejs +13 -23
- package/build/templates/packages/expo-router/tabs/app/[...unmatched].tsx.ejs +4 -4
- package/build/templates/packages/expo-router/tabs/app/_layout.tsx.ejs +4 -0
- package/build/templates/packages/expo-router/tabs/app/modal.tsx.ejs +13 -22
- package/build/templates/packages/expo-router/tabs/components/edit-screen-info.tsx.ejs +28 -28
- package/build/templates/packages/react-navigation/App.tsx.ejs +3 -0
- package/build/templates/packages/react-navigation/components/edit-screen-info.tsx.ejs +6 -6
- package/build/templates/packages/react-navigation/navigation/index.tsx.ejs +21 -12
- package/build/templates/packages/react-navigation/navigation/tab-navigator.tsx.ejs +3 -3
- package/build/templates/packages/react-navigation/screens/details.tsx.ejs +5 -13
- package/build/templates/packages/react-navigation/screens/modal.tsx.ejs +8 -27
- package/build/templates/packages/react-navigation/screens/one.tsx.ejs +7 -26
- package/build/templates/packages/react-navigation/screens/overview.tsx.ejs +8 -38
- package/build/templates/packages/react-navigation/screens/two.tsx.ejs +7 -26
- package/build/templates/packages/unistyles/theme.ts.ejs +68 -18
- package/build/templates/packages/unistyles/unistyles.ts.ejs +4 -5
- package/package.json +1 -1
|
@@ -5,17 +5,23 @@
|
|
|
5
5
|
<% } else if (props.stylingPackage?.name === "restyle") { %>
|
|
6
6
|
import { Box, Text } from 'theme';
|
|
7
7
|
<% } else if (props.stylingPackage?.name === "unistyles") { %>
|
|
8
|
-
import {
|
|
9
|
-
import { Text, View } from
|
|
8
|
+
import { useStyles } from 'react-native-unistyles'
|
|
9
|
+
import { Text, View } from 'react-native';
|
|
10
10
|
<% } else if (props.stylingPackage?.name === "stylesheet") { %>
|
|
11
11
|
import { StyleSheet, Text, View } from "react-native";
|
|
12
12
|
<% } %>
|
|
13
13
|
|
|
14
14
|
const Page = () => {
|
|
15
15
|
<% if (props.stylingPackage?.name === "unistyles") { %>
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
16
|
+
const { theme } = useStyles()
|
|
17
|
+
|
|
18
|
+
return (
|
|
19
|
+
<View style={theme.components.container}>
|
|
20
|
+
<Text style={theme.components.title}>Home</Text>
|
|
21
|
+
<View style={theme.components.separator} />
|
|
22
|
+
</View>
|
|
23
|
+
);
|
|
24
|
+
<% } else if (props.stylingPackage?.name === "nativewind") { %>
|
|
19
25
|
return (
|
|
20
26
|
<View className={styles.container}>
|
|
21
27
|
<Text className={styles.title}>Home</Text>
|
|
@@ -57,23 +63,6 @@ export default Page;
|
|
|
57
63
|
separator: `h-[1px] my-7 w-4/5 bg-gray-200`,
|
|
58
64
|
title: `text-xl font-bold`
|
|
59
65
|
};
|
|
60
|
-
<% } else if (props.stylingPackage?.name === "unistyles") { %>
|
|
61
|
-
const stylesheet = createStyleSheet({
|
|
62
|
-
container: {
|
|
63
|
-
alignItems: "center",
|
|
64
|
-
flex: 1,
|
|
65
|
-
justifyContent: "center",
|
|
66
|
-
},
|
|
67
|
-
separator: {
|
|
68
|
-
height: 1,
|
|
69
|
-
marginVertical: 30,
|
|
70
|
-
width: "80%",
|
|
71
|
-
},
|
|
72
|
-
title: {
|
|
73
|
-
fontSize: 20,
|
|
74
|
-
fontWeight: "bold",
|
|
75
|
-
}
|
|
76
|
-
});
|
|
77
66
|
<% } else if (props.stylingPackage?.name === "stylesheet") { %>
|
|
78
67
|
const styles = StyleSheet.create({
|
|
79
68
|
container: {
|
|
@@ -5,18 +5,23 @@
|
|
|
5
5
|
<% } else if (props.stylingPackage?.name === "restyle") { %>
|
|
6
6
|
import { Box, Text } from 'theme';
|
|
7
7
|
<% } else if (props.stylingPackage?.name === "unistyles") { %>
|
|
8
|
-
import {
|
|
9
|
-
import { Text, View } from
|
|
8
|
+
import { useStyles } from 'react-native-unistyles'
|
|
9
|
+
import { Text, View } from 'react-native';
|
|
10
10
|
<% } else if (props.stylingPackage?.name === "stylesheet") { %>
|
|
11
11
|
import { StyleSheet, Text, View } from "react-native";
|
|
12
12
|
<% } %>
|
|
13
13
|
|
|
14
14
|
const Page = () => {
|
|
15
15
|
<% if (props.stylingPackage?.name === "unistyles") { %>
|
|
16
|
-
const {
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
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") { %>
|
|
20
25
|
return (
|
|
21
26
|
<View className={styles.container}>
|
|
22
27
|
<Text className={styles.title}>News</Text>
|
|
@@ -58,23 +63,6 @@ export default Page;
|
|
|
58
63
|
separator: `h-[1px] my-7 w-4/5 bg-gray-200`,
|
|
59
64
|
title: `text-xl font-bold`
|
|
60
65
|
};
|
|
61
|
-
<% } else if (props.stylingPackage?.name === "unistyles") { %>
|
|
62
|
-
const stylesheet = createStyleSheet({
|
|
63
|
-
container: {
|
|
64
|
-
alignItems: "center",
|
|
65
|
-
flex: 1,
|
|
66
|
-
justifyContent: "center",
|
|
67
|
-
},
|
|
68
|
-
separator: {
|
|
69
|
-
height: 1,
|
|
70
|
-
marginVertical: 30,
|
|
71
|
-
width: "80%",
|
|
72
|
-
},
|
|
73
|
-
title: {
|
|
74
|
-
fontSize: 20,
|
|
75
|
-
fontWeight: "bold",
|
|
76
|
-
}
|
|
77
|
-
});
|
|
78
66
|
<% } else if (props.stylingPackage?.name === "stylesheet") { %>
|
|
79
67
|
const styles = StyleSheet.create({
|
|
80
68
|
container: {
|
|
@@ -3,7 +3,7 @@ import { Link, Stack } from 'expo-router';
|
|
|
3
3
|
import { Text, View } from 'react-native';
|
|
4
4
|
<% } else if (props.stylingPackage?.name === "unistyles") { %>
|
|
5
5
|
import { createStyleSheet, useStyles } from 'react-native-unistyles'
|
|
6
|
-
import { Text, View } from
|
|
6
|
+
import { Text, View } from 'react-native';
|
|
7
7
|
<% } else if (props.stylingPackage?.name === "stylesheet") { %>
|
|
8
8
|
import { StyleSheet, Text, View } from 'react-native';
|
|
9
9
|
<% } else if (props.stylingPackage?.name === "tamagui") { %>
|
|
@@ -17,7 +17,7 @@ export default function NotFoundScreen() {
|
|
|
17
17
|
<% if (props.stylingPackage?.name === "restyle") { %>
|
|
18
18
|
const styles = useStyles();
|
|
19
19
|
<% } else if (props.stylingPackage?.name === "unistyles") {%>
|
|
20
|
-
const {styles} = useStyles(stylesheet);
|
|
20
|
+
const { styles } = useStyles(stylesheet);
|
|
21
21
|
<% } %>
|
|
22
22
|
|
|
23
23
|
return (
|
|
@@ -77,7 +77,7 @@ export default function NotFoundScreen() {
|
|
|
77
77
|
linkText: `text-base text-[#2e78b7]`,
|
|
78
78
|
};
|
|
79
79
|
<% } else if (props.stylingPackage?.name === "unistyles") { %>
|
|
80
|
-
const stylesheet = createStyleSheet({
|
|
80
|
+
const stylesheet = createStyleSheet((theme) => ({
|
|
81
81
|
container: {
|
|
82
82
|
flex: 1,
|
|
83
83
|
alignItems: 'center',
|
|
@@ -94,9 +94,9 @@ export default function NotFoundScreen() {
|
|
|
94
94
|
},
|
|
95
95
|
linkText: {
|
|
96
96
|
fontSize: 14,
|
|
97
|
-
color:
|
|
97
|
+
color: theme.colors.astral,
|
|
98
98
|
},
|
|
99
|
-
});
|
|
99
|
+
}));
|
|
100
100
|
<% } else if (props.stylingPackage?.name === "stylesheet") { %>
|
|
101
101
|
const styles = StyleSheet.create({
|
|
102
102
|
container: {
|
|
@@ -22,10 +22,17 @@ export default function Details() {
|
|
|
22
22
|
const router = useRouter();
|
|
23
23
|
|
|
24
24
|
<% if (props.stylingPackage?.name === "unistyles") { %>
|
|
25
|
-
const {styles} = useStyles(stylesheet);
|
|
26
|
-
<% } %>
|
|
25
|
+
const { styles, theme } = useStyles(stylesheet);
|
|
27
26
|
|
|
28
|
-
|
|
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") { %>
|
|
29
36
|
const BackButton = () => (
|
|
30
37
|
<TouchableOpacity onPress={router.back}>
|
|
31
38
|
<View className={styles.backButton}>
|
|
@@ -92,6 +99,14 @@ export default function Details() {
|
|
|
92
99
|
</Box>
|
|
93
100
|
</Box>
|
|
94
101
|
</>
|
|
102
|
+
<% } else if (props.stylingPackage?.name === "unistyles") { %>
|
|
103
|
+
<View style={styles.container}>
|
|
104
|
+
<Stack.Screen options={{ title: "Details", headerLeft: () => <BackButton /> }} />
|
|
105
|
+
<View style={styles.main}>
|
|
106
|
+
<Text style={theme.components.title}>Details</Text>
|
|
107
|
+
<Text style={theme.components.subtitle}>Showing details for user {name}.</Text>
|
|
108
|
+
</View>
|
|
109
|
+
</View>
|
|
95
110
|
<% } else { %>
|
|
96
111
|
<View style={styles.container}>
|
|
97
112
|
<Stack.Screen options={{ title: "Details", headerLeft: () => <BackButton /> }} />
|
|
@@ -114,32 +129,24 @@ export default function Details() {
|
|
|
114
129
|
subtitle: "text-4xl text-gray-700",
|
|
115
130
|
};
|
|
116
131
|
<% } else if (props.stylingPackage?.name === "unistyles") { %>
|
|
117
|
-
const stylesheet = createStyleSheet({
|
|
132
|
+
const stylesheet = createStyleSheet((theme) => ({
|
|
118
133
|
backButton: {
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
fontSize: 64,
|
|
136
|
-
fontWeight: "bold",
|
|
137
|
-
},
|
|
138
|
-
subtitle: {
|
|
139
|
-
fontSize: 36,
|
|
140
|
-
color: "#38434D",
|
|
141
|
-
},
|
|
142
|
-
});
|
|
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
|
+
}));
|
|
143
150
|
<% } else if (props.stylingPackage?.name === "stylesheet") { %>
|
|
144
151
|
const styles = StyleSheet.create({
|
|
145
152
|
backButton: {
|
|
@@ -8,7 +8,7 @@
|
|
|
8
8
|
import { Box, Text, makeStyles } from 'theme';
|
|
9
9
|
<% } else if (props.stylingPackage?.name === "unistyles") { %>
|
|
10
10
|
import { createStyleSheet, useStyles } from 'react-native-unistyles';
|
|
11
|
-
import { Text, TouchableOpacity, View } from
|
|
11
|
+
import { Text, TouchableOpacity, View } from 'react-native';
|
|
12
12
|
<% } else { %>
|
|
13
13
|
import { StyleSheet, Text, TouchableOpacity, View } from "react-native";
|
|
14
14
|
<% } %>
|
|
@@ -22,7 +22,7 @@ export default function Page() {
|
|
|
22
22
|
<% } %>
|
|
23
23
|
|
|
24
24
|
<% if (props.stylingPackage?.name === "unistyles") { %>
|
|
25
|
-
const {styles} = useStyles(stylesheet);
|
|
25
|
+
const { styles, theme } = useStyles(stylesheet);
|
|
26
26
|
<% } %>
|
|
27
27
|
|
|
28
28
|
return (
|
|
@@ -77,6 +77,21 @@ export default function Page() {
|
|
|
77
77
|
</Box>
|
|
78
78
|
</Box>
|
|
79
79
|
</>
|
|
80
|
+
<% } else if (props.stylingPackage?.name === "unistyles") { %>
|
|
81
|
+
<View style={styles.container}>
|
|
82
|
+
<View style={styles.main}>
|
|
83
|
+
<Stack.Screen options={{ title: 'Overview' }} />
|
|
84
|
+
<View>
|
|
85
|
+
<Text style={theme.components.title}>Hello World</Text>
|
|
86
|
+
<Text style={theme.components.subtitle}>This is the first page of your app.</Text>
|
|
87
|
+
</View>
|
|
88
|
+
<Link href={{ pathname: '/details', params: { name: 'Dan' } }} asChild>
|
|
89
|
+
<TouchableOpacity style={theme.components.button} >
|
|
90
|
+
<Text style={theme.components.buttonText}>Show Details</Text>
|
|
91
|
+
</TouchableOpacity>
|
|
92
|
+
</Link>
|
|
93
|
+
</View>
|
|
94
|
+
</View>
|
|
80
95
|
<% } else { %>
|
|
81
96
|
<View style={styles.container}>
|
|
82
97
|
<View style={styles.main}>
|
|
@@ -126,47 +141,18 @@ export default function Page() {
|
|
|
126
141
|
}));
|
|
127
142
|
<% } else if (props.stylingPackage?.name === "unistyles") { %>
|
|
128
143
|
const stylesheet = createStyleSheet({
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
},
|
|
142
|
-
shadowOpacity: 0.25,
|
|
143
|
-
shadowRadius: 3.84
|
|
144
|
-
},
|
|
145
|
-
buttonText: {
|
|
146
|
-
color: "#FFFFFF",
|
|
147
|
-
fontSize: 16,
|
|
148
|
-
fontWeight: "600",
|
|
149
|
-
textAlign: "center",
|
|
150
|
-
},
|
|
151
|
-
container: {
|
|
152
|
-
flex: 1,
|
|
153
|
-
padding: 24,
|
|
154
|
-
},
|
|
155
|
-
main: {
|
|
156
|
-
flex: 1,
|
|
157
|
-
maxWidth: 960,
|
|
158
|
-
marginHorizontal: "auto",
|
|
159
|
-
justifyContent: "space-between",
|
|
160
|
-
},
|
|
161
|
-
title: {
|
|
162
|
-
fontSize: 64,
|
|
163
|
-
fontWeight: "bold",
|
|
164
|
-
},
|
|
165
|
-
subtitle: {
|
|
166
|
-
color: "#38434D",
|
|
167
|
-
fontSize: 36,
|
|
168
|
-
}
|
|
169
|
-
});
|
|
144
|
+
container: {
|
|
145
|
+
flex: 1,
|
|
146
|
+
padding: 24,
|
|
147
|
+
},
|
|
148
|
+
main: {
|
|
149
|
+
flex: 1,
|
|
150
|
+
maxWidth: 960,
|
|
151
|
+
marginHorizontal: 'auto',
|
|
152
|
+
justifyContent: 'space-between',
|
|
153
|
+
},
|
|
154
|
+
});
|
|
155
|
+
|
|
170
156
|
<% } else if (props.stylingPackage?.name === "stylesheet") { %>
|
|
171
157
|
const styles = StyleSheet.create({
|
|
172
158
|
button: {
|
|
@@ -2,7 +2,7 @@ import FontAwesome from "@expo/vector-icons/FontAwesome";
|
|
|
2
2
|
import { Link, Tabs } from "expo-router";
|
|
3
3
|
<% if (props.stylingPackage?.name === "unistyles") { %>
|
|
4
4
|
import { createStyleSheet, useStyles } from 'react-native-unistyles'
|
|
5
|
-
import { Pressable } from
|
|
5
|
+
import { Pressable } from 'react-native';
|
|
6
6
|
<% } else { %>
|
|
7
7
|
import { Pressable, StyleSheet } from "react-native";
|
|
8
8
|
<% } %>
|
|
@@ -19,26 +19,26 @@ function TabBarIcon(props: {
|
|
|
19
19
|
|
|
20
20
|
export default function TabLayout() {
|
|
21
21
|
<% if (props.stylingPackage?.name === "unistyles") { %>
|
|
22
|
-
const {styles} = useStyles(stylesheet)
|
|
22
|
+
const { styles } = useStyles(stylesheet)
|
|
23
23
|
<% } %>
|
|
24
24
|
return (
|
|
25
25
|
<Tabs
|
|
26
26
|
screenOptions={{
|
|
27
|
-
tabBarActiveTintColor:
|
|
27
|
+
tabBarActiveTintColor: 'black',
|
|
28
28
|
}}>
|
|
29
29
|
<Tabs.Screen
|
|
30
|
-
name=
|
|
30
|
+
name='index'
|
|
31
31
|
options={{
|
|
32
|
-
title:
|
|
33
|
-
tabBarIcon: ({ color }) => <TabBarIcon name=
|
|
32
|
+
title: 'Tab One',
|
|
33
|
+
tabBarIcon: ({ color }) => <TabBarIcon name='code' color={color} />,
|
|
34
34
|
headerRight: () => (
|
|
35
|
-
<Link href=
|
|
35
|
+
<Link href='/modal' asChild>
|
|
36
36
|
<Pressable>
|
|
37
37
|
{({ pressed }) => (
|
|
38
38
|
<FontAwesome
|
|
39
|
-
name=
|
|
39
|
+
name='info-circle'
|
|
40
40
|
size={25}
|
|
41
|
-
color=
|
|
41
|
+
color='gray'
|
|
42
42
|
style={[styles.headerRight, { opacity: pressed ? 0.5 : 1 }]}
|
|
43
43
|
/>
|
|
44
44
|
)}
|
|
@@ -5,8 +5,8 @@
|
|
|
5
5
|
<% } else if (props.stylingPackage?.name === "restyle") { %>
|
|
6
6
|
import { Box, Text } from 'theme';
|
|
7
7
|
<% } else if (props.stylingPackage?.name === "unistyles") { %>
|
|
8
|
-
import {
|
|
9
|
-
import { Text, View } from
|
|
8
|
+
import { useStyles } from 'react-native-unistyles'
|
|
9
|
+
import { Text, View } from 'react-native';
|
|
10
10
|
<% } else { %>
|
|
11
11
|
import { StyleSheet, Text, View } from "react-native";
|
|
12
12
|
<% } %>
|
|
@@ -15,9 +15,16 @@ import EditScreenInfo from "../../components/edit-screen-info";
|
|
|
15
15
|
|
|
16
16
|
export default function TabOneScreen() {
|
|
17
17
|
<% if (props.stylingPackage?.name === "unistyles") { %>
|
|
18
|
-
const {
|
|
19
|
-
|
|
20
|
-
|
|
18
|
+
const { theme } = useStyles()
|
|
19
|
+
|
|
20
|
+
return (
|
|
21
|
+
<View style={theme.components.container}>
|
|
22
|
+
<Text style={theme.components.title}>Tab One</Text>
|
|
23
|
+
<View style={theme.components.separator} />
|
|
24
|
+
<EditScreenInfo path="app/(tabs)/index.tsx" />
|
|
25
|
+
</View>
|
|
26
|
+
);
|
|
27
|
+
<% } else if (props.stylingPackage?.name === "nativewind") { %>
|
|
21
28
|
return (
|
|
22
29
|
<View className={styles.container}>
|
|
23
30
|
<Text className={styles.title}>Tab One</Text>
|
|
@@ -42,7 +49,7 @@ export default function TabOneScreen() {
|
|
|
42
49
|
<Box height={1} marginVertical="l_32" width="80%" />
|
|
43
50
|
<EditScreenInfo path="app/(tabs)/index.tsx" />
|
|
44
51
|
</Box>
|
|
45
|
-
);
|
|
52
|
+
);
|
|
46
53
|
<% } else { %>
|
|
47
54
|
return (
|
|
48
55
|
<View style={styles.container}>
|
|
@@ -60,23 +67,6 @@ export default function TabOneScreen() {
|
|
|
60
67
|
separator: `h-[1px] my-7 w-4/5 bg-gray-200`,
|
|
61
68
|
title: `text-xl font-bold`
|
|
62
69
|
};
|
|
63
|
-
<% } else if (props.stylingPackage?.name === "unistyles") { %>
|
|
64
|
-
const stylesheet = createStyleSheet({
|
|
65
|
-
container: {
|
|
66
|
-
alignItems: "center",
|
|
67
|
-
flex: 1,
|
|
68
|
-
justifyContent: "center",
|
|
69
|
-
},
|
|
70
|
-
separator: {
|
|
71
|
-
height: 1,
|
|
72
|
-
marginVertical: 30,
|
|
73
|
-
width: "80%",
|
|
74
|
-
},
|
|
75
|
-
title: {
|
|
76
|
-
fontSize: 20,
|
|
77
|
-
fontWeight: "bold",
|
|
78
|
-
}
|
|
79
|
-
});
|
|
80
70
|
<% } else if (props.stylingPackage?.name === "stylesheet") { %>
|
|
81
71
|
const styles = StyleSheet.create({
|
|
82
72
|
container: {
|
|
@@ -5,8 +5,8 @@
|
|
|
5
5
|
<% } else if (props.stylingPackage?.name === "restyle") { %>
|
|
6
6
|
import { Box, Text } from 'theme';
|
|
7
7
|
<% } else if (props.stylingPackage?.name === "unistyles") { %>
|
|
8
|
-
import {
|
|
9
|
-
import { Text, View } from
|
|
8
|
+
import { useStyles } from 'react-native-unistyles'
|
|
9
|
+
import { Text, View } from 'react-native';
|
|
10
10
|
<% } else { %>
|
|
11
11
|
import { StyleSheet, Text, View } from "react-native";
|
|
12
12
|
<% } %>
|
|
@@ -15,9 +15,16 @@ import EditScreenInfo from "../../components/edit-screen-info";
|
|
|
15
15
|
|
|
16
16
|
export default function TabTwoScreen() {
|
|
17
17
|
<% if (props.stylingPackage?.name === "unistyles") { %>
|
|
18
|
-
const {
|
|
19
|
-
|
|
20
|
-
|
|
18
|
+
const { theme } = useStyles()
|
|
19
|
+
|
|
20
|
+
return (
|
|
21
|
+
<View style={theme.components.container}>
|
|
22
|
+
<Text style={theme.components.title}>Tab Two</Text>
|
|
23
|
+
<View style={theme.components.separator} />
|
|
24
|
+
<EditScreenInfo path='app/(tabs)/two.tsx' />
|
|
25
|
+
</View>
|
|
26
|
+
);
|
|
27
|
+
<% } else if (props.stylingPackage?.name === "nativewind") { %>
|
|
21
28
|
return (
|
|
22
29
|
<View className={styles.container}>
|
|
23
30
|
<Text className={styles.title}>Tab Two</Text>
|
|
@@ -42,7 +49,7 @@ export default function TabTwoScreen() {
|
|
|
42
49
|
<Box height={1} marginVertical="l_32" width="80%" />
|
|
43
50
|
<EditScreenInfo path="app/(tabs)/two.tsx" />
|
|
44
51
|
</Box>
|
|
45
|
-
);
|
|
52
|
+
);
|
|
46
53
|
<% } else { %>
|
|
47
54
|
return (
|
|
48
55
|
<View style={styles.container}>
|
|
@@ -60,23 +67,6 @@ export default function TabTwoScreen() {
|
|
|
60
67
|
separator: `h-[1px] my-7 w-4/5 bg-gray-200`,
|
|
61
68
|
title: `text-xl font-bold`
|
|
62
69
|
};
|
|
63
|
-
<% } else if (props.stylingPackage?.name === "unistyles") { %>
|
|
64
|
-
const stylesheet = createStyleSheet({
|
|
65
|
-
container: {
|
|
66
|
-
alignItems: "center",
|
|
67
|
-
flex: 1,
|
|
68
|
-
justifyContent: "center",
|
|
69
|
-
},
|
|
70
|
-
separator: {
|
|
71
|
-
height: 1,
|
|
72
|
-
marginVertical: 30,
|
|
73
|
-
width: "80%",
|
|
74
|
-
},
|
|
75
|
-
title: {
|
|
76
|
-
fontSize: 20,
|
|
77
|
-
fontWeight: "bold",
|
|
78
|
-
}
|
|
79
|
-
});
|
|
80
70
|
<% } else if (props.stylingPackage?.name === "stylesheet") { %>
|
|
81
71
|
const styles = StyleSheet.create({
|
|
82
72
|
container: {
|
|
@@ -19,7 +19,7 @@ export default function NotFoundScreen() {
|
|
|
19
19
|
<% } %>
|
|
20
20
|
|
|
21
21
|
<% if (props.stylingPackage?.name === "unistyles") {%>
|
|
22
|
-
const {styles} = useStyles(stylesheet);
|
|
22
|
+
const { styles } = useStyles(stylesheet);
|
|
23
23
|
<% } %>
|
|
24
24
|
|
|
25
25
|
return (
|
|
@@ -79,7 +79,7 @@ export default function NotFoundScreen() {
|
|
|
79
79
|
linkText: `text-base text-[#2e78b7]`,
|
|
80
80
|
};
|
|
81
81
|
<% } else if (props.stylingPackage?.name === "unistyles") { %>
|
|
82
|
-
const stylesheet = createStyleSheet({
|
|
82
|
+
const stylesheet = createStyleSheet((theme) => ({
|
|
83
83
|
container: {
|
|
84
84
|
flex: 1,
|
|
85
85
|
alignItems: 'center',
|
|
@@ -96,9 +96,9 @@ export default function NotFoundScreen() {
|
|
|
96
96
|
},
|
|
97
97
|
linkText: {
|
|
98
98
|
fontSize: 14,
|
|
99
|
-
color:
|
|
99
|
+
color: theme.colors.astral,
|
|
100
100
|
},
|
|
101
|
-
});
|
|
101
|
+
}));
|
|
102
102
|
<% } else if (props.stylingPackage?.name === "stylesheet") { %>
|
|
103
103
|
const styles = StyleSheet.create({
|
|
104
104
|
container: {
|
|
@@ -7,8 +7,8 @@
|
|
|
7
7
|
import { Platform } from 'react-native';
|
|
8
8
|
import { Box, Text } from 'theme';
|
|
9
9
|
<% } else if (props.stylingPackage?.name === "unistyles") { %>
|
|
10
|
-
import {
|
|
11
|
-
import { Platform, Text, View } from
|
|
10
|
+
import { useStyles } from 'react-native-unistyles'
|
|
11
|
+
import { Platform, Text, View } from 'react-native';
|
|
12
12
|
<% } else { %>
|
|
13
13
|
import { Platform, StyleSheet, Text, View } from "react-native";
|
|
14
14
|
<% } %>
|
|
@@ -18,9 +18,17 @@ import EditScreenInfo from "../components/edit-screen-info";
|
|
|
18
18
|
|
|
19
19
|
export default function ModalScreen() {
|
|
20
20
|
<% if (props.stylingPackage?.name === "unistyles") { %>
|
|
21
|
-
const {
|
|
22
|
-
|
|
23
|
-
|
|
21
|
+
const { theme } = useStyles()
|
|
22
|
+
|
|
23
|
+
return (
|
|
24
|
+
<View style={theme.components.container}>
|
|
25
|
+
<StatusBar style={Platform.OS === 'ios' ? 'light' : 'auto'} />
|
|
26
|
+
<Text style={theme.components.title}>Modal</Text>
|
|
27
|
+
<View style={theme.components.separator} />
|
|
28
|
+
<EditScreenInfo path='app/modal.tsx' />
|
|
29
|
+
</View>
|
|
30
|
+
);
|
|
31
|
+
<% } else if (props.stylingPackage?.name === "nativewind") { %>
|
|
24
32
|
return (
|
|
25
33
|
<View className={styles.container}>
|
|
26
34
|
<StatusBar style={Platform.OS === "ios" ? "light" : "auto"} />
|
|
@@ -67,23 +75,6 @@ export default function ModalScreen() {
|
|
|
67
75
|
separator: `h-[1px] my-7 w-4/5 bg-gray-200`,
|
|
68
76
|
title: `text-xl font-bold`
|
|
69
77
|
};
|
|
70
|
-
<% } else if (props.stylingPackage?.name === "unistyles") { %>
|
|
71
|
-
const stylesheet = createStyleSheet({
|
|
72
|
-
container: {
|
|
73
|
-
alignItems: "center",
|
|
74
|
-
flex: 1,
|
|
75
|
-
justifyContent: "center"
|
|
76
|
-
},
|
|
77
|
-
separator: {
|
|
78
|
-
height: 1,
|
|
79
|
-
marginVertical: 30,
|
|
80
|
-
width: "80%"
|
|
81
|
-
},
|
|
82
|
-
title: {
|
|
83
|
-
fontSize: 20,
|
|
84
|
-
fontWeight: "bold"
|
|
85
|
-
}
|
|
86
|
-
});
|
|
87
78
|
<% } else if (props.stylingPackage?.name === "stylesheet") { %>
|
|
88
79
|
const styles = StyleSheet.create({
|
|
89
80
|
container: {
|
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
import { Box, Text } from 'theme';
|
|
7
7
|
<% } else if (props.stylingPackage?.name === "unistyles") { %>
|
|
8
8
|
import { createStyleSheet, useStyles } from 'react-native-unistyles'
|
|
9
|
-
import { Text, View } from
|
|
9
|
+
import { Text, View } from 'react-native';
|
|
10
10
|
<% } else { %>
|
|
11
11
|
import { StyleSheet, Text, View } from "react-native";
|
|
12
12
|
<% } %>
|
|
@@ -92,33 +92,33 @@ export default function EditScreenInfo({ path }: { path: string }) {
|
|
|
92
92
|
};
|
|
93
93
|
<% } else if (props.stylingPackage?.name === "unistyles") { %>
|
|
94
94
|
const stylesheet = createStyleSheet({
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
95
|
+
codeHighlightContainer: {
|
|
96
|
+
borderRadius: 3,
|
|
97
|
+
paddingHorizontal: 4
|
|
98
|
+
},
|
|
99
|
+
getStartedContainer: {
|
|
100
|
+
alignItems: 'center',
|
|
101
|
+
marginHorizontal: 50
|
|
102
|
+
},
|
|
103
|
+
getStartedText: {
|
|
104
|
+
fontSize: 17,
|
|
105
|
+
lineHeight: 24,
|
|
106
|
+
textAlign: 'center'
|
|
107
|
+
},
|
|
108
|
+
helpContainer: {
|
|
109
|
+
alignItems: 'center',
|
|
110
|
+
marginHorizontal: 20,
|
|
111
|
+
marginTop: 15
|
|
112
|
+
},
|
|
113
|
+
helpLink: {
|
|
114
|
+
paddingVertical: 15
|
|
115
|
+
},
|
|
116
|
+
helpLinkText: {
|
|
117
|
+
textAlign: 'center'
|
|
118
|
+
},
|
|
119
|
+
homeScreenFilename: {
|
|
120
|
+
marginVertical: 7
|
|
121
|
+
}
|
|
122
122
|
});
|
|
123
123
|
<% } else if (props.stylingPackage?.name === "stylesheet") { %>
|
|
124
124
|
const styles = StyleSheet.create({
|
|
@@ -5,7 +5,7 @@ import React from "react";
|
|
|
5
5
|
import { Box, Text } from 'theme';
|
|
6
6
|
<% } else if (props.stylingPackage?.name === "unistyles") { %>
|
|
7
7
|
import { createStyleSheet, useStyles } from 'react-native-unistyles'
|
|
8
|
-
import { Text, View } from
|
|
8
|
+
import { Text, View } from 'react-native';
|
|
9
9
|
<% } else { %>
|
|
10
10
|
import { StyleSheet, Text, View } from "react-native";
|
|
11
11
|
<% } %>
|
|
@@ -57,7 +57,7 @@ import React from "react";
|
|
|
57
57
|
}
|
|
58
58
|
<% } else if (props.stylingPackage?.name === "unistyles") { %>
|
|
59
59
|
export default function EditScreenInfo({ path }: { path: string }) {
|
|
60
|
-
const {styles} = useStyles(stylesheet)
|
|
60
|
+
const { styles } = useStyles(stylesheet)
|
|
61
61
|
return (
|
|
62
62
|
<View>
|
|
63
63
|
<View style={styles.getStartedContainer}>
|
|
@@ -124,16 +124,16 @@ import React from "react";
|
|
|
124
124
|
paddingHorizontal: 4
|
|
125
125
|
},
|
|
126
126
|
getStartedContainer: {
|
|
127
|
-
alignItems:
|
|
127
|
+
alignItems: 'center',
|
|
128
128
|
marginHorizontal: 50
|
|
129
129
|
},
|
|
130
130
|
getStartedText: {
|
|
131
131
|
fontSize: 17,
|
|
132
132
|
lineHeight: 24,
|
|
133
|
-
textAlign:
|
|
133
|
+
textAlign: 'center'
|
|
134
134
|
},
|
|
135
135
|
helpContainer: {
|
|
136
|
-
alignItems:
|
|
136
|
+
alignItems: 'center',
|
|
137
137
|
marginHorizontal: 20,
|
|
138
138
|
marginTop: 15
|
|
139
139
|
},
|
|
@@ -141,7 +141,7 @@ import React from "react";
|
|
|
141
141
|
paddingVertical: 15
|
|
142
142
|
},
|
|
143
143
|
helpLinkText: {
|
|
144
|
-
textAlign:
|
|
144
|
+
textAlign: 'center'
|
|
145
145
|
},
|
|
146
146
|
homeScreenFilename: {
|
|
147
147
|
marginVertical: 7
|
|
@@ -10,7 +10,7 @@
|
|
|
10
10
|
import { Box, Text, useTheme } from 'theme';
|
|
11
11
|
<% } else if (props.stylingPackage?.name === "unistyles") { %>
|
|
12
12
|
import { createStyleSheet, useStyles } from 'react-native-unistyles'
|
|
13
|
-
import { Text, View } from
|
|
13
|
+
import { Text, View } from 'react-native';
|
|
14
14
|
<% } else { %>
|
|
15
15
|
import { Text, View, StyleSheet } from "react-native";
|
|
16
16
|
<% } %>
|
|
@@ -31,7 +31,7 @@
|
|
|
31
31
|
<% } %>
|
|
32
32
|
|
|
33
33
|
<% if (props.stylingPackage?.name === "unistyles") { %>
|
|
34
|
-
const { styles } = useStyles(stylesheet)
|
|
34
|
+
const { styles, theme } = useStyles(stylesheet);
|
|
35
35
|
<% } %>
|
|
36
36
|
|
|
37
37
|
return (
|
|
@@ -77,6 +77,15 @@
|
|
|
77
77
|
</Box>
|
|
78
78
|
),
|
|
79
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
|
+
})}
|
|
80
89
|
<% } else { %>
|
|
81
90
|
options={({ navigation }) => ({
|
|
82
91
|
headerLeft: () => (
|
|
@@ -99,16 +108,16 @@
|
|
|
99
108
|
backButtonText: "text-blue-500 ml-1"
|
|
100
109
|
};
|
|
101
110
|
<% } else if (props.stylingPackage?.name === "unistyles") { %>
|
|
102
|
-
const stylesheet = createStyleSheet({
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
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
|
+
}));
|
|
112
121
|
<% } else if (props.stylingPackage?.name === "stylesheet") { %>
|
|
113
122
|
const styles = StyleSheet.create({
|
|
114
123
|
backButton: {
|
|
@@ -3,7 +3,7 @@ import { createBottomTabNavigator } from '@react-navigation/bottom-tabs';
|
|
|
3
3
|
import { StackScreenProps } from '@react-navigation/stack';
|
|
4
4
|
<% if (props.stylingPackage?.name === "unistyles") {%>
|
|
5
5
|
import { createStyleSheet, useStyles } from 'react-native-unistyles'
|
|
6
|
-
import { Pressable } from
|
|
6
|
+
import { Pressable } from 'react-native';
|
|
7
7
|
<% } else { %>
|
|
8
8
|
import { Pressable, StyleSheet } from "react-native";
|
|
9
9
|
<% } %>
|
|
@@ -19,7 +19,7 @@ function TabBarIcon(props: {
|
|
|
19
19
|
color: string;
|
|
20
20
|
}) {
|
|
21
21
|
<% if (props.stylingPackage?.name === "unistyles") {%>
|
|
22
|
-
const {styles} = useStyles(stylesheet)
|
|
22
|
+
const { styles } = useStyles(stylesheet)
|
|
23
23
|
<% } %>
|
|
24
24
|
return <FontAwesome size={28} style={styles.tabBarIcon} {...props} />;
|
|
25
25
|
}
|
|
@@ -28,7 +28,7 @@ type Props = StackScreenProps<RootStackParamList, 'TabNavigator'>;
|
|
|
28
28
|
|
|
29
29
|
export default function TabLayout({ navigation }: Props) {
|
|
30
30
|
<% if (props.stylingPackage?.name === "unistyles") {%>
|
|
31
|
-
const {styles} = useStyles(stylesheet)
|
|
31
|
+
const { styles } = useStyles(stylesheet)
|
|
32
32
|
<% } %>
|
|
33
33
|
|
|
34
34
|
return (
|
|
@@ -8,7 +8,7 @@ import { RouteProp, useRoute } from "@react-navigation/native";
|
|
|
8
8
|
import { Box, Text } from 'theme';
|
|
9
9
|
<% } else if (props.stylingPackage?.name === "unistyles") { %>
|
|
10
10
|
import { createStyleSheet, useStyles } from 'react-native-unistyles'
|
|
11
|
-
import { View, Text } from
|
|
11
|
+
import { View, Text } from 'react-native';
|
|
12
12
|
<% } else { %>
|
|
13
13
|
import { View, StyleSheet, Text } from "react-native";
|
|
14
14
|
<% } %>
|
|
@@ -50,12 +50,12 @@ export default function Details() {
|
|
|
50
50
|
</Box>
|
|
51
51
|
);
|
|
52
52
|
<% } else if (props.stylingPackage?.name === "unistyles") { %>
|
|
53
|
-
const {styles} = useStyles(stylesheet)
|
|
53
|
+
const { styles, theme } = useStyles(stylesheet)
|
|
54
54
|
return (
|
|
55
55
|
<View style={styles.container}>
|
|
56
56
|
<View style={styles.main}>
|
|
57
|
-
<Text style={
|
|
58
|
-
<Text style={
|
|
57
|
+
<Text style={theme.components.title}>Details</Text>
|
|
58
|
+
<Text style={theme.components.subtitle}>Showing details for user {router.params.name}.</Text>
|
|
59
59
|
</View>
|
|
60
60
|
</View>
|
|
61
61
|
);
|
|
@@ -87,15 +87,7 @@ export default function Details() {
|
|
|
87
87
|
main: {
|
|
88
88
|
flex: 1,
|
|
89
89
|
maxWidth: 960,
|
|
90
|
-
marginHorizontal:
|
|
91
|
-
},
|
|
92
|
-
title: {
|
|
93
|
-
fontSize: 64,
|
|
94
|
-
fontWeight: "bold",
|
|
95
|
-
},
|
|
96
|
-
subtitle: {
|
|
97
|
-
fontSize: 36,
|
|
98
|
-
color: "#38434D",
|
|
90
|
+
marginHorizontal: 'auto',
|
|
99
91
|
},
|
|
100
92
|
});
|
|
101
93
|
<% } else if (props.stylingPackage?.name === "stylesheet") { %>
|
|
@@ -7,8 +7,8 @@
|
|
|
7
7
|
import { Platform } from 'react-native';
|
|
8
8
|
import { Box, Text, makeStyles } from 'theme';
|
|
9
9
|
<% } else if (props.stylingPackage?.name === "unistyles") { %>
|
|
10
|
-
import {
|
|
11
|
-
import { Platform, Text, View } from
|
|
10
|
+
import { useStyles } from 'react-native-unistyles'
|
|
11
|
+
import { Platform, Text, View } from 'react-native';
|
|
12
12
|
<% } else { %>
|
|
13
13
|
import { Platform, StyleSheet, Text, View } from "react-native";
|
|
14
14
|
<% } %>
|
|
@@ -49,13 +49,13 @@ export default function Modal() {
|
|
|
49
49
|
</Box>
|
|
50
50
|
);
|
|
51
51
|
<% } else if (props.stylingPackage?.name === "unistyles") { %>
|
|
52
|
-
const {
|
|
52
|
+
const { theme } = useStyles()
|
|
53
53
|
return (
|
|
54
|
-
<View style={
|
|
55
|
-
<StatusBar style={Platform.OS ===
|
|
56
|
-
<Text style={
|
|
57
|
-
<View style={
|
|
58
|
-
<EditScreenInfo path=
|
|
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
59
|
</View>
|
|
60
60
|
);
|
|
61
61
|
<% } else { %>
|
|
@@ -86,25 +86,6 @@ export default function Modal() {
|
|
|
86
86
|
width: '80%',
|
|
87
87
|
},
|
|
88
88
|
}));
|
|
89
|
-
<% } else if (props.stylingPackage?.name === "unistyles") { %>
|
|
90
|
-
const stylesheet = createStyleSheet({
|
|
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
89
|
<% } else if (props.stylingPackage?.name === "stylesheet") { %>
|
|
109
90
|
const styles = StyleSheet.create({
|
|
110
91
|
container: {
|
|
@@ -5,8 +5,8 @@
|
|
|
5
5
|
<% } else if (props.stylingPackage?.name === "restyle") { %>
|
|
6
6
|
import { Box, Text, makeStyles } from 'theme';
|
|
7
7
|
<% } else if (props.stylingPackage?.name === "unistyles") { %>
|
|
8
|
-
import {
|
|
9
|
-
import { Text, View } from
|
|
8
|
+
import { useStyles } from 'react-native-unistyles'
|
|
9
|
+
import { Text, View } from 'react-native';
|
|
10
10
|
<% } else { %>
|
|
11
11
|
import { StyleSheet, Text, View } from "react-native";
|
|
12
12
|
<% } %>
|
|
@@ -43,12 +43,12 @@ export default function TabOneScreen() {
|
|
|
43
43
|
</Box>
|
|
44
44
|
);
|
|
45
45
|
<% } else if (props.stylingPackage?.name === "unistyles") { %>
|
|
46
|
-
const {
|
|
46
|
+
const { theme } = useStyles()
|
|
47
47
|
return (
|
|
48
|
-
<View style={
|
|
49
|
-
<Text style={
|
|
50
|
-
<View style={
|
|
51
|
-
<EditScreenInfo path=
|
|
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
52
|
</View>
|
|
53
53
|
);
|
|
54
54
|
<% } else { %>
|
|
@@ -78,25 +78,6 @@ export default function TabOneScreen() {
|
|
|
78
78
|
width: '80%',
|
|
79
79
|
},
|
|
80
80
|
}));
|
|
81
|
-
<% } else if (props.stylingPackage?.name === "unistyles") { %>
|
|
82
|
-
const stylesheet = createStyleSheet({
|
|
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
81
|
<% } else if (props.stylingPackage?.name === "stylesheet") { %>
|
|
101
82
|
const styles = StyleSheet.create({
|
|
102
83
|
container: {
|
|
@@ -10,7 +10,7 @@ import { StackNavigationProp } from "@react-navigation/stack";
|
|
|
10
10
|
import { Box, Text, makeStyles } from 'theme';
|
|
11
11
|
<% } else if (props.stylingPackage?.name === "unistyles") { %>
|
|
12
12
|
import { createStyleSheet, useStyles } from 'react-native-unistyles'
|
|
13
|
-
import { Text, TouchableOpacity, View } from
|
|
13
|
+
import { Text, TouchableOpacity, View } from 'react-native';
|
|
14
14
|
<% } else { %>
|
|
15
15
|
import { StyleSheet, Text, TouchableOpacity, View } from "react-native";
|
|
16
16
|
<% } %>
|
|
@@ -70,16 +70,16 @@ export default function Overview() {
|
|
|
70
70
|
</Box>
|
|
71
71
|
);
|
|
72
72
|
<% } else if (props.stylingPackage?.name === "unistyles") { %>
|
|
73
|
-
const {styles} = useStyles(stylesheet)
|
|
73
|
+
const { styles, theme } = useStyles(stylesheet)
|
|
74
74
|
return (
|
|
75
75
|
<View style={styles.container}>
|
|
76
76
|
<View style={styles.main}>
|
|
77
77
|
<View>
|
|
78
|
-
<Text style={
|
|
79
|
-
<Text style={
|
|
78
|
+
<Text style={theme.components.title}>Hello World</Text>
|
|
79
|
+
<Text style={theme.components.subtitle}>This is the first page of your app.</Text>
|
|
80
80
|
</View>
|
|
81
|
-
<TouchableOpacity style={
|
|
82
|
-
<Text style={
|
|
81
|
+
<TouchableOpacity style={theme.components.button} onPress={() => navigation.navigate('Details', { name: 'Dan' })}>
|
|
82
|
+
<Text style={theme.components.buttonText}>Show Details</Text>
|
|
83
83
|
</TouchableOpacity>
|
|
84
84
|
</View>
|
|
85
85
|
</View>
|
|
@@ -131,28 +131,6 @@ export default function Overview() {
|
|
|
131
131
|
}));
|
|
132
132
|
<% } else if (props.stylingPackage?.name === "unistyles") { %>
|
|
133
133
|
const stylesheet = createStyleSheet({
|
|
134
|
-
button: {
|
|
135
|
-
alignItems: "center",
|
|
136
|
-
backgroundColor: "#6366F1",
|
|
137
|
-
borderRadius: 24,
|
|
138
|
-
elevation: 5,
|
|
139
|
-
flexDirection: "row",
|
|
140
|
-
justifyContent: "center",
|
|
141
|
-
padding: 16,
|
|
142
|
-
shadowColor: "#000",
|
|
143
|
-
shadowOffset: {
|
|
144
|
-
height: 2,
|
|
145
|
-
width: 0
|
|
146
|
-
},
|
|
147
|
-
shadowOpacity: 0.25,
|
|
148
|
-
shadowRadius: 3.84
|
|
149
|
-
},
|
|
150
|
-
buttonText: {
|
|
151
|
-
color: "#FFFFFF",
|
|
152
|
-
fontSize: 16,
|
|
153
|
-
fontWeight: "600",
|
|
154
|
-
textAlign: "center",
|
|
155
|
-
},
|
|
156
134
|
container: {
|
|
157
135
|
flex: 1,
|
|
158
136
|
padding: 24,
|
|
@@ -160,17 +138,9 @@ export default function Overview() {
|
|
|
160
138
|
main: {
|
|
161
139
|
flex: 1,
|
|
162
140
|
maxWidth: 960,
|
|
163
|
-
marginHorizontal:
|
|
164
|
-
justifyContent:
|
|
165
|
-
},
|
|
166
|
-
title: {
|
|
167
|
-
fontSize: 64,
|
|
168
|
-
fontWeight: "bold",
|
|
141
|
+
marginHorizontal: 'auto',
|
|
142
|
+
justifyContent: 'space-between',
|
|
169
143
|
},
|
|
170
|
-
subtitle: {
|
|
171
|
-
color: "#38434D",
|
|
172
|
-
fontSize: 36,
|
|
173
|
-
}
|
|
174
144
|
});
|
|
175
145
|
<% } else if (props.stylingPackage?.name === "stylesheet") { %>
|
|
176
146
|
const styles = StyleSheet.create({
|
|
@@ -5,8 +5,8 @@
|
|
|
5
5
|
<% } else if (props.stylingPackage?.name === "restyle") { %>
|
|
6
6
|
import { Box, Text, makeStyles } from 'theme';
|
|
7
7
|
<% } else if (props.stylingPackage?.name === "unistyles") { %>
|
|
8
|
-
import {
|
|
9
|
-
import { Text, View } from
|
|
8
|
+
import { useStyles } from 'react-native-unistyles'
|
|
9
|
+
import { Text, View } from 'react-native';
|
|
10
10
|
<% } else { %>
|
|
11
11
|
import { StyleSheet, Text, View } from "react-native";
|
|
12
12
|
<% } %>
|
|
@@ -33,12 +33,12 @@ export default function TabTwoScreen() {
|
|
|
33
33
|
</Theme>
|
|
34
34
|
);
|
|
35
35
|
<% } else if (props.stylingPackage?.name === "unistyles") { %>
|
|
36
|
-
const {
|
|
36
|
+
const { theme } = useStyles()
|
|
37
37
|
return (
|
|
38
|
-
<View style={
|
|
39
|
-
<Text style={
|
|
40
|
-
<View style={
|
|
41
|
-
<EditScreenInfo path=
|
|
38
|
+
<View style={theme.components.container}>
|
|
39
|
+
<Text style={theme.components.title}>Tab Two</Text>
|
|
40
|
+
<View style={theme.components.separator} />
|
|
41
|
+
<EditScreenInfo path='src/screens/two.tsx' />
|
|
42
42
|
</View>
|
|
43
43
|
);
|
|
44
44
|
<% } else if (props.stylingPackage?.name === "restyle") { %>
|
|
@@ -78,25 +78,6 @@ export default function TabTwoScreen() {
|
|
|
78
78
|
width: '80%',
|
|
79
79
|
},
|
|
80
80
|
}));
|
|
81
|
-
<% } else if (props.stylingPackage?.name === "unistyles") { %>
|
|
82
|
-
const stylesheet = createStyleSheet({
|
|
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
81
|
<% } else if (props.stylingPackage?.name === "stylesheet") { %>
|
|
101
82
|
const styles = StyleSheet.create({
|
|
102
83
|
container: {
|
|
@@ -1,26 +1,76 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
},
|
|
8
|
-
margins: {
|
|
9
|
-
sm: 2,
|
|
10
|
-
md: 4,
|
|
11
|
-
lg: 8,
|
|
12
|
-
xl: 12
|
|
13
|
-
}
|
|
1
|
+
const colors = {
|
|
2
|
+
white: '#ffffff',
|
|
3
|
+
azureRadiance: '#007AFF',
|
|
4
|
+
limedSpruce: '#38434D',
|
|
5
|
+
cornflowerBlue: '#6366F1',
|
|
6
|
+
astral: '#2E78B7'
|
|
14
7
|
} as const;
|
|
15
8
|
|
|
16
|
-
export const
|
|
17
|
-
colors
|
|
18
|
-
|
|
9
|
+
export const lightTheme = {
|
|
10
|
+
colors,
|
|
11
|
+
components: {
|
|
12
|
+
<% if (props.navigationPackage?.options.type === 'tabs' || props.navigationPackage?.options.type === 'drawer') {%>
|
|
13
|
+
container: {
|
|
14
|
+
alignItems: 'center',
|
|
15
|
+
flex: 1,
|
|
16
|
+
justifyContent: 'center'
|
|
17
|
+
},
|
|
18
|
+
title: {
|
|
19
|
+
fontSize: 20,
|
|
20
|
+
fontWeight: 'bold',
|
|
21
|
+
},
|
|
22
|
+
<% if (props.navigationPackage?.name === 'expo-router') { %>
|
|
23
|
+
separator: {
|
|
24
|
+
height: 1,
|
|
25
|
+
marginVertical: 30,
|
|
26
|
+
width: '80%',
|
|
27
|
+
},
|
|
28
|
+
<% } else { %>
|
|
29
|
+
separator: {
|
|
30
|
+
backgroundColor: 'gray',
|
|
31
|
+
height: 1,
|
|
32
|
+
marginVertical: 30,
|
|
33
|
+
opacity: 0.25,
|
|
34
|
+
width: '80%',
|
|
35
|
+
},
|
|
36
|
+
<% } %>
|
|
37
|
+
<% } else { %>
|
|
38
|
+
button: {
|
|
39
|
+
alignItems: 'center',
|
|
40
|
+
backgroundColor: colors.cornflowerBlue,
|
|
41
|
+
borderRadius: 24,
|
|
42
|
+
elevation: 5,
|
|
43
|
+
flexDirection: 'row',
|
|
44
|
+
justifyContent: 'center',
|
|
45
|
+
padding: 16,
|
|
46
|
+
shadowColor: '#000',
|
|
47
|
+
shadowOffset: {
|
|
48
|
+
height: 2,
|
|
49
|
+
width: 0,
|
|
50
|
+
},
|
|
51
|
+
shadowOpacity: 0.25,
|
|
52
|
+
shadowRadius: 3.84,
|
|
53
|
+
},
|
|
54
|
+
buttonText: {
|
|
55
|
+
color: colors.white,
|
|
56
|
+
fontSize: 16,
|
|
57
|
+
fontWeight: '600',
|
|
58
|
+
textAlign: 'center',
|
|
59
|
+
},
|
|
60
|
+
title: {
|
|
61
|
+
fontSize: 64,
|
|
62
|
+
fontWeight: 'bold',
|
|
63
|
+
},
|
|
64
|
+
subtitle: {
|
|
65
|
+
color: colors.limedSpruce,
|
|
66
|
+
fontSize: 36,
|
|
67
|
+
},
|
|
68
|
+
<% } %>
|
|
19
69
|
},
|
|
20
70
|
margins: {
|
|
21
71
|
sm: 2,
|
|
22
72
|
md: 4,
|
|
23
73
|
lg: 8,
|
|
24
|
-
xl: 12
|
|
25
|
-
}
|
|
74
|
+
xl: 12,
|
|
75
|
+
},
|
|
26
76
|
} as const;
|
|
@@ -1,13 +1,13 @@
|
|
|
1
|
-
import { breakpoints } from './breakpoints';
|
|
2
|
-
import { darkTheme, lightTheme } from './theme';
|
|
3
1
|
import { UnistylesRegistry } from 'react-native-unistyles';
|
|
4
2
|
|
|
3
|
+
import { breakpoints } from './breakpoints';
|
|
4
|
+
import { lightTheme } from './theme';
|
|
5
|
+
|
|
5
6
|
type AppBreakpoints = typeof breakpoints;
|
|
6
7
|
|
|
7
8
|
// if you defined themes
|
|
8
9
|
type AppThemes = {
|
|
9
10
|
light: typeof lightTheme;
|
|
10
|
-
dark: typeof darkTheme;
|
|
11
11
|
};
|
|
12
12
|
|
|
13
13
|
// override library types
|
|
@@ -19,10 +19,9 @@ declare module 'react-native-unistyles' {
|
|
|
19
19
|
UnistylesRegistry.addBreakpoints(breakpoints)
|
|
20
20
|
.addThemes({
|
|
21
21
|
light: lightTheme,
|
|
22
|
-
dark: darkTheme
|
|
23
22
|
// register other themes with unique names
|
|
24
23
|
})
|
|
25
24
|
.addConfig({
|
|
26
25
|
// you can pass here optional config described below
|
|
27
|
-
adaptiveThemes: true
|
|
26
|
+
adaptiveThemes: true,
|
|
28
27
|
});
|