create-expo-stack 2.1.11 → 2.1.12
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 +0 -1
- package/build/templates/base/babel.config.js.ejs +1 -1
- package/build/templates/packages/expo-router/stack/app/_layout.tsx.ejs +3 -2
- package/build/templates/packages/expo-router/stack/app/details.tsx.ejs +1 -1
- package/build/templates/packages/expo-router/stack/app/index.tsx.ejs +2 -2
- package/build/templates/packages/expo-router/tabs/app/_layout.tsx.ejs +1 -1
- package/build/templates/packages/expo-router/tabs/app/modal.tsx.ejs +2 -1
- package/build/templates/packages/expo-router/tabs/components/edit-screen-info.tsx.ejs +2 -2
- package/build/templates/packages/react-navigation/App.tsx.ejs +1 -1
- package/build/templates/packages/react-navigation/navigation/index.tsx.ejs +2 -0
- package/build/templates/packages/react-navigation/screens/details.tsx.ejs +1 -1
- package/build/templates/packages/react-navigation/screens/modal.tsx.ejs +2 -1
- package/build/templates/packages/react-navigation/screens/one.tsx.ejs +1 -1
- package/build/templates/packages/react-navigation/screens/overview.tsx.ejs +1 -1
- package/build/templates/packages/react-navigation/screens/two.tsx.ejs +7 -7
- package/package.json +1 -1
|
@@ -5,7 +5,6 @@ import React from 'react';
|
|
|
5
5
|
<% } else if (props.stylingPackage?.name === "tamagui") {%>
|
|
6
6
|
import { View } from 'react-native';
|
|
7
7
|
import { TamaguiProvider, Text, styled } from 'tamagui';
|
|
8
|
-
|
|
9
8
|
import config from './tamagui.config'
|
|
10
9
|
<% } else {%>
|
|
11
10
|
import { StyleSheet, Text, View } from 'react-native';
|
|
@@ -4,6 +4,7 @@ import { Stack, useRouter } from "expo-router";
|
|
|
4
4
|
import { Text, TouchableOpacity, View } from "react-native";
|
|
5
5
|
<% } else if (props.stylingPackage?.name === "tamagui") { %>
|
|
6
6
|
import { TamaguiProvider, Button } from "tamagui";
|
|
7
|
+
import config from '../tamagui.config'
|
|
7
8
|
<% } else { %>
|
|
8
9
|
import { StyleSheet, Text, TouchableOpacity, View } from "react-native";
|
|
9
10
|
<% } %>
|
|
@@ -20,9 +21,9 @@ export default function Layout() {
|
|
|
20
21
|
</TouchableOpacity>
|
|
21
22
|
);
|
|
22
23
|
<% } else if (props.stylingPackage?.name === "tamagui") { %>
|
|
23
|
-
const BackButton = () =>
|
|
24
|
+
const BackButton = () => (
|
|
24
25
|
<Button onPress={router.back} icon={<Feather name="chevron-left" size={16} color="#007AFF" />}>Back</Button>
|
|
25
|
-
|
|
26
|
+
)
|
|
26
27
|
<% } else { %>
|
|
27
28
|
const BackButton = () => (
|
|
28
29
|
<TouchableOpacity onPress={router.back}>
|
|
@@ -20,7 +20,7 @@ export default function Details() {
|
|
|
20
20
|
);
|
|
21
21
|
<% } else if (props.stylingPackage?.name === "tamagui") { %>
|
|
22
22
|
return (
|
|
23
|
-
<YStack flex={1}
|
|
23
|
+
<YStack flex={1} padding="$2">
|
|
24
24
|
<YStack flex={1} maxWidth={960}>
|
|
25
25
|
<H2>Details</H2>
|
|
26
26
|
<Paragraph theme="alt1">Showing details for user {name}.</Paragraph>
|
|
@@ -1,7 +1,7 @@
|
|
|
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
|
-
import { YStack, H2, Paragraph } from "tamagui"
|
|
4
|
+
import { YStack, H2, Paragraph, Button } from "tamagui"
|
|
5
5
|
<% } else { %>
|
|
6
6
|
import { StyleSheet, Text, TouchableOpacity, View } from "react-native";
|
|
7
7
|
<% } %>
|
|
@@ -27,7 +27,7 @@ export default function Page() {
|
|
|
27
27
|
<% } else if (props.stylingPackage?.name === "tamagui") { %>
|
|
28
28
|
return (
|
|
29
29
|
<YStack flex={1} padding="$3">
|
|
30
|
-
<YStack flex={1}
|
|
30
|
+
<YStack flex={1} maxWidth="{960}" justifyContent="space-between">
|
|
31
31
|
<YStack>
|
|
32
32
|
<H2>Hello World</H2>
|
|
33
33
|
<Paragraph>This is the first page of your app.</Paragraph>
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { Stack } from "expo-router";
|
|
2
2
|
<% if (props.stylingPackage?.name === "tamagui") { %>
|
|
3
3
|
import { TamaguiProvider } from 'tamagui'
|
|
4
|
-
import
|
|
4
|
+
import config from './tamagui.config'
|
|
5
5
|
<% } %>
|
|
6
6
|
|
|
7
7
|
export const unstable_settings = {
|
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
<% if (props.stylingPackage?.name === "nativewind") { %>
|
|
2
2
|
import { Platform, Text, View } from "react-native";
|
|
3
|
-
<% } else if (props.stylingPackage?.name === "
|
|
3
|
+
<% } else if (props.stylingPackage?.name === "tamagui") { %>
|
|
4
4
|
import { YStack, Paragraph, Separator } from "tamagui";
|
|
5
|
+
import { Platform } from 'react-native'
|
|
5
6
|
<% } else { %>
|
|
6
7
|
import { Platform, StyleSheet, Text, View } from "react-native";
|
|
7
8
|
<% } %>
|
|
@@ -27,11 +27,11 @@ export default function EditScreenInfo({ path }: { path: string }) {
|
|
|
27
27
|
<% } else if (props.stylingPackage?.name === "tamagui") { %>
|
|
28
28
|
return (
|
|
29
29
|
<YStack>
|
|
30
|
-
<YStack alignItems="center"
|
|
30
|
+
<YStack alignItems="center" marginHorizontal="$6">
|
|
31
31
|
<H4>
|
|
32
32
|
Open up the code for this screen:
|
|
33
33
|
</H4>
|
|
34
|
-
<YStack borderRadius="$3"
|
|
34
|
+
<YStack borderRadius="$3" marginVertical="$1">
|
|
35
35
|
<Paragraph>{path}</Paragraph>
|
|
36
36
|
</YStack>
|
|
37
37
|
<Paragraph>
|
|
@@ -2,7 +2,7 @@ import "react-native-gesture-handler";
|
|
|
2
2
|
import RootStack from "./src/navigation";
|
|
3
3
|
<% if (props.stylingPackage?.name === "tamagui") { %>
|
|
4
4
|
import { TamaguiProvider } from 'tamagui'
|
|
5
|
-
import
|
|
5
|
+
import config from './tamagui.config'
|
|
6
6
|
<% } %>
|
|
7
7
|
export default function App() {
|
|
8
8
|
return (
|
|
@@ -4,6 +4,8 @@
|
|
|
4
4
|
import { createStackNavigator } from "@react-navigation/stack";
|
|
5
5
|
<% if (props.stylingPackage?.name === "nativewind") { %>
|
|
6
6
|
import { Text, View } from "react-native";
|
|
7
|
+
<% } else if (props.stylingPackage?.name === "tamagui") { %>
|
|
8
|
+
import { Button } from "tamagui";
|
|
7
9
|
<% } else { %>
|
|
8
10
|
import { Text, View, StyleSheet } from "react-native";
|
|
9
11
|
<% } %>
|
|
@@ -23,7 +23,7 @@ export default function Details() {
|
|
|
23
23
|
);
|
|
24
24
|
<% } else if (props.stylingPackage?.name === "tamagui") { %>
|
|
25
25
|
return (
|
|
26
|
-
<YStack flex={1}
|
|
26
|
+
<YStack flex={1} paddingTop="$2">
|
|
27
27
|
<YStack flex={1} maxWidth={960}>
|
|
28
28
|
<H2>Details</H2>
|
|
29
29
|
<Paragraph>Showing details for user {router.params.name}.</Paragraph>
|
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
<% if (props.stylingPackage?.name === "nativewind") { %>
|
|
2
2
|
import { Platform, Text, View } from "react-native";
|
|
3
|
-
<% } else if (props.stylingPackage?.name === "
|
|
3
|
+
<% } else if (props.stylingPackage?.name === "tamagui") { %>
|
|
4
4
|
import { YStack, Paragraph, Separator } from "tamagui";
|
|
5
|
+
import { Platform } from 'react-native'
|
|
5
6
|
<% } else { %>
|
|
6
7
|
import { Platform, StyleSheet, Text, View } from "react-native";
|
|
7
8
|
<% } %>
|
|
@@ -42,7 +42,7 @@ export default function TabOneScreen() {
|
|
|
42
42
|
separator: "h-[1px] my-7 w-4/5 bg-gray-200",
|
|
43
43
|
title: "text-xl font-bold"
|
|
44
44
|
};
|
|
45
|
-
<% } else if (props.stylingPackage?.name === "
|
|
45
|
+
<% } else if (props.stylingPackage?.name === "stylesheet") { %>
|
|
46
46
|
const styles = StyleSheet.create({
|
|
47
47
|
container: {
|
|
48
48
|
alignItems: "center",
|
|
@@ -30,7 +30,7 @@ export default function Overview() {
|
|
|
30
30
|
<% } else if (props.stylingPackage?.name === "tamagui") { %>
|
|
31
31
|
return (
|
|
32
32
|
<YStack flex={1} padding="$3">
|
|
33
|
-
<YStack flex={1}
|
|
33
|
+
<YStack flex={1} maxWidth="{960}" justifyContent="space-between">
|
|
34
34
|
<YStack>
|
|
35
35
|
<H2>Hello World</H2>
|
|
36
36
|
<Paragraph>This is the first page of your app.</Paragraph>
|
|
@@ -1,28 +1,28 @@
|
|
|
1
1
|
<% if (props.stylingPackage?.name === "nativewind") { %>
|
|
2
2
|
import { Text, View } from "react-native";
|
|
3
3
|
<% } else if (props.stylingPackage?.name === "tamagui") { %>
|
|
4
|
-
import { YStack,
|
|
4
|
+
import { YStack, H2, Separator } from "tamagui";
|
|
5
5
|
<% } else { %>
|
|
6
6
|
import { StyleSheet, Text, View } from "react-native";
|
|
7
7
|
<% } %>
|
|
8
8
|
|
|
9
9
|
import EditScreenInfo from "../components/edit-screen-info";
|
|
10
10
|
|
|
11
|
-
export default function
|
|
11
|
+
export default function TabTwoScreen() {
|
|
12
12
|
<% if (props.stylingPackage?.name === "nativewind") { %>
|
|
13
13
|
return (
|
|
14
14
|
<View className={styles.container}>
|
|
15
|
-
<Text className={styles.title}>Tab
|
|
15
|
+
<Text className={styles.title}>Tab Two</Text>
|
|
16
16
|
<View className={styles.separator} />
|
|
17
|
-
<EditScreenInfo path="src/screens/
|
|
17
|
+
<EditScreenInfo path="src/screens/two.tsx" />
|
|
18
18
|
</View>
|
|
19
19
|
);
|
|
20
20
|
<% } else if (props.stylingPackage?.name === "tamagui") { %>
|
|
21
21
|
return (
|
|
22
|
-
<YStack
|
|
23
|
-
<
|
|
22
|
+
<YStack flex={1} alignItems="center" justifyContent="center">
|
|
23
|
+
<H2>Tab One</H2>
|
|
24
24
|
<Separator />
|
|
25
|
-
<EditScreenInfo path="src/screens/
|
|
25
|
+
<EditScreenInfo path="src/screens/two.tsx" />
|
|
26
26
|
</YStack>
|
|
27
27
|
);
|
|
28
28
|
<% } else { %>
|