@mr.dj2u/create-expo-stack 2.21.3-mrdj.0
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 +435 -0
- package/bin/create-expo-stack.js +2 -0
- package/build/cli.js +49 -0
- package/build/commands/create-expo-stack.js +471 -0
- package/build/constants.js +39 -0
- package/build/templates/base/.gitignore.ejs +26 -0
- package/build/templates/base/.npmrc.ejs +1 -0
- package/build/templates/base/App.tsx.ejs +66 -0
- package/build/templates/base/app.json.ejs +69 -0
- package/build/templates/base/assets/adaptive-icon.png +0 -0
- package/build/templates/base/assets/favicon.png +0 -0
- package/build/templates/base/assets/icon.png +0 -0
- package/build/templates/base/assets/splash.png +0 -0
- package/build/templates/base/babel.config.js.ejs +38 -0
- package/build/templates/base/components/BackButton.tsx.ejs +23 -0
- package/build/templates/base/components/Button.tsx.ejs +42 -0
- package/build/templates/base/components/Container.tsx.ejs +14 -0
- package/build/templates/base/components/EditScreenInfo.tsx.ejs +44 -0
- package/build/templates/base/components/HeaderButton.tsx.ejs +31 -0
- package/build/templates/base/components/ScreenContent.tsx.ejs +40 -0
- package/build/templates/base/components/TabBarIcon.tsx.ejs +15 -0
- package/build/templates/base/eslint.config.js.ejs +15 -0
- package/build/templates/base/package.json.ejs +191 -0
- package/build/templates/base/prettier.config.js.ejs +11 -0
- package/build/templates/base/tsconfig.json.ejs +39 -0
- package/build/templates/packages/expo-router/drawer/app/(drawer)/(tabs)/_layout.tsx.ejs +40 -0
- package/build/templates/packages/expo-router/drawer/app/(drawer)/(tabs)/index.tsx.ejs +15 -0
- package/build/templates/packages/expo-router/drawer/app/(drawer)/(tabs)/two.tsx.ejs +15 -0
- package/build/templates/packages/expo-router/drawer/app/(drawer)/_layout.tsx.ejs +65 -0
- package/build/templates/packages/expo-router/drawer/app/(drawer)/index.tsx.ejs +15 -0
- package/build/templates/packages/expo-router/drawer/app/+html.tsx.ejs +49 -0
- package/build/templates/packages/expo-router/drawer/app/+not-found.tsx.ejs +100 -0
- package/build/templates/packages/expo-router/drawer/app/_layout.tsx.ejs +91 -0
- package/build/templates/packages/expo-router/drawer/app/modal.tsx.ejs +21 -0
- package/build/templates/packages/expo-router/expo-env.d.ts +4 -0
- package/build/templates/packages/expo-router/index.js.ejs +4 -0
- package/build/templates/packages/expo-router/metro.config.js.ejs +24 -0
- package/build/templates/packages/expo-router/stack/app/+html.tsx.ejs +49 -0
- package/build/templates/packages/expo-router/stack/app/+not-found.tsx.ejs +113 -0
- package/build/templates/packages/expo-router/stack/app/_layout.tsx.ejs +63 -0
- package/build/templates/packages/expo-router/stack/app/details.tsx.ejs +56 -0
- package/build/templates/packages/expo-router/stack/app/index.tsx.ejs +73 -0
- package/build/templates/packages/expo-router/tabs/app/(tabs)/_layout.tsx.ejs +52 -0
- package/build/templates/packages/expo-router/tabs/app/(tabs)/index.tsx.ejs +37 -0
- package/build/templates/packages/expo-router/tabs/app/(tabs)/two.tsx.ejs +37 -0
- package/build/templates/packages/expo-router/tabs/app/+html.tsx.ejs +49 -0
- package/build/templates/packages/expo-router/tabs/app/+not-found.tsx.ejs +110 -0
- package/build/templates/packages/expo-router/tabs/app/_layout.tsx.ejs +84 -0
- package/build/templates/packages/expo-router/tabs/app/modal.tsx.ejs +21 -0
- package/build/templates/packages/firebase/.env.ejs +8 -0
- package/build/templates/packages/firebase/metro.config.js.ejs +14 -0
- package/build/templates/packages/firebase/utils/firebase.ts.ejs +26 -0
- 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 +22 -0
- package/build/templates/packages/nativewind/components/Button.tsx.ejs +21 -0
- package/build/templates/packages/nativewind/components/Container.tsx.ejs +13 -0
- package/build/templates/packages/nativewind/components/EditScreenInfo.tsx.ejs +40 -0
- package/build/templates/packages/nativewind/components/ScreenContent.tsx.ejs +27 -0
- package/build/templates/packages/nativewind/global.css +3 -0
- package/build/templates/packages/nativewind/metro.config.js +7 -0
- package/build/templates/packages/nativewind/nativewind-env.d.ts +2 -0
- package/build/templates/packages/nativewind/tailwind.config.js.ejs +15 -0
- package/build/templates/packages/nativewindui/components/Container.tsx.ejs +14 -0
- package/build/templates/packages/nativewindui/components/EditScreenInfo.tsx.ejs +45 -0
- package/build/templates/packages/nativewindui/components/HeaderButton.tsx.ejs +31 -0
- package/build/templates/packages/nativewindui/components/ScreenContent.tsx.ejs +40 -0
- package/build/templates/packages/nativewindui/components/TabBarIcon.tsx.ejs +15 -0
- package/build/templates/packages/nativewindui/components/nativewindui/Icon/Icon.ios.tsx.ejs +52 -0
- package/build/templates/packages/nativewindui/components/nativewindui/Icon/Icon.tsx.ejs +58 -0
- package/build/templates/packages/nativewindui/components/nativewindui/Icon/index.ts.ejs +16 -0
- package/build/templates/packages/nativewindui/components/nativewindui/Icon/types.ts.ejs +18 -0
- package/build/templates/packages/nativewindui/components/nativewindui/ThemeToggle.tsx.ejs +33 -0
- package/build/templates/packages/nativewindui/drawer/app/(drawer)/(tabs)/_layout.tsx.ejs +28 -0
- package/build/templates/packages/nativewindui/drawer/app/(drawer)/(tabs)/index.tsx.ejs +15 -0
- package/build/templates/packages/nativewindui/drawer/app/(drawer)/(tabs)/two.tsx.ejs +15 -0
- package/build/templates/packages/nativewindui/drawer/app/(drawer)/_layout.tsx.ejs +35 -0
- package/build/templates/packages/nativewindui/drawer/app/(drawer)/index.tsx.ejs +535 -0
- package/build/templates/packages/nativewindui/drawer/app/+html.tsx.ejs +46 -0
- package/build/templates/packages/nativewindui/drawer/app/+not-found.tsx.ejs +83 -0
- package/build/templates/packages/nativewindui/drawer/app/_layout.tsx.ejs +75 -0
- package/build/templates/packages/nativewindui/drawer/app/modal.tsx.ejs +33 -0
- package/build/templates/packages/nativewindui/global.css.ejs +91 -0
- package/build/templates/packages/nativewindui/lib/cn.ts.ejs +6 -0
- package/build/templates/packages/nativewindui/lib/useColorScheme.tsx.ejs +21 -0
- package/build/templates/packages/nativewindui/nativewind-env.d.ts.ejs +1 -0
- package/build/templates/packages/nativewindui/stack/app/+html.tsx.ejs +46 -0
- package/build/templates/packages/nativewindui/stack/app/+not-found.tsx.ejs +18 -0
- package/build/templates/packages/nativewindui/stack/app/_layout.tsx.ejs +78 -0
- package/build/templates/packages/nativewindui/stack/app/index.tsx.ejs +487 -0
- package/build/templates/packages/nativewindui/stack/app/modal.tsx.ejs +33 -0
- package/build/templates/packages/nativewindui/tabs/app/(tabs)/_layout.tsx.ejs +35 -0
- package/build/templates/packages/nativewindui/tabs/app/(tabs)/index.tsx.ejs +537 -0
- package/build/templates/packages/nativewindui/tabs/app/(tabs)/two.tsx.ejs +22 -0
- package/build/templates/packages/nativewindui/tabs/app/+html.tsx.ejs +46 -0
- package/build/templates/packages/nativewindui/tabs/app/+not-found.tsx.ejs +90 -0
- package/build/templates/packages/nativewindui/tabs/app/_layout.tsx.ejs +78 -0
- package/build/templates/packages/nativewindui/tabs/app/modal.tsx.ejs +21 -0
- package/build/templates/packages/nativewindui/tailwind.config.js.ejs +67 -0
- package/build/templates/packages/nativewindui/theme/colors.ts.ejs +123 -0
- package/build/templates/packages/nativewindui/theme/index.ts.ejs +32 -0
- package/build/templates/packages/nativewindui/theme/with-opacity.ts.ejs +155 -0
- package/build/templates/packages/react-navigation/App.tsx.ejs +73 -0
- package/build/templates/packages/react-navigation/navigation/drawer-navigator.tsx.ejs +31 -0
- package/build/templates/packages/react-navigation/navigation/index.tsx.ejs +108 -0
- package/build/templates/packages/react-navigation/navigation/tab-navigator.tsx.ejs +38 -0
- package/build/templates/packages/react-navigation/screens/details.tsx.ejs +41 -0
- package/build/templates/packages/react-navigation/screens/home.tsx.ejs +5 -0
- package/build/templates/packages/react-navigation/screens/modal.tsx.ejs +20 -0
- package/build/templates/packages/react-navigation/screens/one.tsx.ejs +5 -0
- package/build/templates/packages/react-navigation/screens/overview.tsx.ejs +54 -0
- package/build/templates/packages/react-navigation/screens/two.tsx.ejs +5 -0
- package/build/templates/packages/restyle/components/BackButton.tsx.ejs +19 -0
- package/build/templates/packages/restyle/components/Button.tsx.ejs +32 -0
- package/build/templates/packages/restyle/components/Container.tsx.ejs +16 -0
- package/build/templates/packages/restyle/components/EditScreenInfo.tsx.ejs +38 -0
- package/build/templates/packages/restyle/components/ScreenContent.tsx.ejs +30 -0
- package/build/templates/packages/restyle/theme.ts.ejs +51 -0
- package/build/templates/packages/supabase/.env.ejs +2 -0
- package/build/templates/packages/supabase/utils/supabase.ts.ejs +14 -0
- package/build/templates/packages/tamagui/components/BackButton.tsx.ejs +12 -0
- package/build/templates/packages/tamagui/components/Button.tsx.ejs +17 -0
- package/build/templates/packages/tamagui/components/Container.tsx.ejs +12 -0
- package/build/templates/packages/tamagui/components/EditScreenInfo.tsx.ejs +27 -0
- package/build/templates/packages/tamagui/components/ScreenContent.tsx.ejs +23 -0
- package/build/templates/packages/tamagui/tamagui.config.ts.ejs +14 -0
- package/build/templates/packages/unistyles/breakpoints.ts.ejs +9 -0
- package/build/templates/packages/unistyles/components/BackButton.tsx.ejs +28 -0
- package/build/templates/packages/unistyles/components/Button.tsx.ejs +42 -0
- package/build/templates/packages/unistyles/components/Container.tsx.ejs +17 -0
- package/build/templates/packages/unistyles/components/EditScreenInfo.tsx.ejs +53 -0
- package/build/templates/packages/unistyles/components/ScreenContent.tsx.ejs +43 -0
- package/build/templates/packages/unistyles/theme.ts.ejs +34 -0
- package/build/templates/packages/unistyles/unistyles.ts.ejs +27 -0
- package/build/templates/packages/uniwind/global.css +2 -0
- package/build/templates/packages/uniwind/metro.config.js.ejs +10 -0
- package/build/templates/packages/vexo-analytics/.env.ejs +7 -0
- package/build/templates/packages/zustand/store/store.ts.ejs +15 -0
- package/build/types/cli.d.ts +4 -0
- package/build/types/commands/create-expo-stack.d.ts +3 -0
- package/build/types/constants.d.ts +10 -0
- package/build/types/types.d.ts +33 -0
- package/build/types/utilities/bumpVersion.d.ts +1 -0
- package/build/types/utilities/clearNavigationPackages.d.ts +2 -0
- package/build/types/utilities/clearStylingPackages.d.ts +2 -0
- package/build/types/utilities/configAnalytics.d.ts +18 -0
- package/build/types/utilities/configStorage.d.ts +8 -0
- package/build/types/utilities/configureProjectFiles.d.ts +3 -0
- package/build/types/utilities/copyBaseAssets.d.ts +2 -0
- package/build/types/utilities/generateNWUI.d.ts +3 -0
- package/build/types/utilities/generateProjectFiles.d.ts +5 -0
- package/build/types/utilities/getPackageManager.d.ts +8 -0
- package/build/types/utilities/index.d.ts +10 -0
- package/build/types/utilities/printOutput.d.ts +3 -0
- package/build/types/utilities/publishToGitHub.d.ts +2 -0
- package/build/types/utilities/renderTitle.d.ts +2 -0
- package/build/types/utilities/runCLI.d.ts +3 -0
- package/build/types/utilities/runEasConfigure.d.ts +3 -0
- package/build/types/utilities/runIgnite.d.ts +3 -0
- package/build/types/utilities/showHelp.d.ts +1 -0
- package/build/types/utilities/systemCommand.d.ts +14 -0
- package/build/types/utilities/usePackage.d.ts +2 -0
- package/build/types/utilities/validateProjectName.d.ts +4 -0
- package/build/types.js +39 -0
- package/build/utilities/bumpVersion.js +21 -0
- package/build/utilities/clearNavigationPackages.js +11 -0
- package/build/utilities/clearStylingPackages.js +11 -0
- package/build/utilities/configAnalytics.js +70 -0
- package/build/utilities/configStorage.js +50 -0
- package/build/utilities/configureProjectFiles.js +380 -0
- package/build/utilities/copyBaseAssets.js +21 -0
- package/build/utilities/generateNWUI.js +54 -0
- package/build/utilities/generateProjectFiles.js +106 -0
- package/build/utilities/getPackageManager.js +103 -0
- package/build/utilities/index.js +27 -0
- package/build/utilities/printOutput.js +251 -0
- package/build/utilities/publishToGitHub.js +173 -0
- package/build/utilities/renderTitle.js +55 -0
- package/build/utilities/runCLI.js +437 -0
- package/build/utilities/runEasConfigure.js +83 -0
- package/build/utilities/runIgnite.js +26 -0
- package/build/utilities/showHelp.js +85 -0
- package/build/utilities/systemCommand.js +40 -0
- package/build/utilities/usePackage.js +8 -0
- package/build/utilities/validateProjectName.js +42 -0
- package/package.json +77 -0
|
@@ -0,0 +1,65 @@
|
|
|
1
|
+
import { Ionicons, MaterialIcons } from '@expo/vector-icons';
|
|
2
|
+
import { Link } from 'expo-router';
|
|
3
|
+
import { Drawer } from 'expo-router/drawer';
|
|
4
|
+
<% if (props.stylingPackage?.name === "unistyles") { %>
|
|
5
|
+
import { useUnistyles } from "react-native-unistyles";
|
|
6
|
+
<% } %>
|
|
7
|
+
|
|
8
|
+
import { HeaderButton } from '../../components/HeaderButton';
|
|
9
|
+
|
|
10
|
+
const DrawerLayout = () => {
|
|
11
|
+
<% if (props.stylingPackage?.name === "unistyles") { %>
|
|
12
|
+
const { theme } = useUnistyles();
|
|
13
|
+
<% } %>
|
|
14
|
+
|
|
15
|
+
return (
|
|
16
|
+
<% if (props.stylingPackage?.name === "unistyles") { %>
|
|
17
|
+
<Drawer
|
|
18
|
+
screenOptions={{
|
|
19
|
+
headerStyle: {
|
|
20
|
+
backgroundColor: theme.colors.background,
|
|
21
|
+
},
|
|
22
|
+
headerTitleStyle: {
|
|
23
|
+
color: theme.colors.typography,
|
|
24
|
+
},
|
|
25
|
+
headerTintColor: theme.colors.typography,
|
|
26
|
+
drawerStyle: {
|
|
27
|
+
backgroundColor: theme.colors.background,
|
|
28
|
+
},
|
|
29
|
+
drawerLabelStyle: {
|
|
30
|
+
color: theme.colors.typography,
|
|
31
|
+
},
|
|
32
|
+
drawerInactiveTintColor: theme.colors.typography,
|
|
33
|
+
}}
|
|
34
|
+
>
|
|
35
|
+
<% } else { %>
|
|
36
|
+
<Drawer>
|
|
37
|
+
<% } %>
|
|
38
|
+
<Drawer.Screen
|
|
39
|
+
name="index"
|
|
40
|
+
options={{
|
|
41
|
+
headerTitle: 'Home',
|
|
42
|
+
drawerLabel: 'Home',
|
|
43
|
+
drawerIcon: ({ size, color }) => <Ionicons name="home-outline" size={size} color={color} />,
|
|
44
|
+
}}
|
|
45
|
+
/>
|
|
46
|
+
<Drawer.Screen
|
|
47
|
+
name="(tabs)"
|
|
48
|
+
options={{
|
|
49
|
+
headerTitle: 'Tabs',
|
|
50
|
+
drawerLabel: 'Tabs',
|
|
51
|
+
drawerIcon: ({ size, color }) => (
|
|
52
|
+
<MaterialIcons name="border-bottom" size={size} color={color} />
|
|
53
|
+
),
|
|
54
|
+
headerRight: () => (
|
|
55
|
+
<Link href="/modal" asChild>
|
|
56
|
+
<HeaderButton />
|
|
57
|
+
</Link>
|
|
58
|
+
),
|
|
59
|
+
}}
|
|
60
|
+
/>
|
|
61
|
+
</Drawer>
|
|
62
|
+
);
|
|
63
|
+
}
|
|
64
|
+
|
|
65
|
+
export default DrawerLayout;
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { Stack } from 'expo-router';
|
|
2
|
+
|
|
3
|
+
import { Container } from '@/components/Container';
|
|
4
|
+
import { ScreenContent } from '@/components/ScreenContent';
|
|
5
|
+
|
|
6
|
+
export default function Home() {
|
|
7
|
+
return (
|
|
8
|
+
<>
|
|
9
|
+
<Stack.Screen options={{ title: 'Home' }} />
|
|
10
|
+
<Container>
|
|
11
|
+
<ScreenContent path="app/(drawer)/index.tsx" title="Home" />
|
|
12
|
+
</Container>
|
|
13
|
+
</>
|
|
14
|
+
);
|
|
15
|
+
}
|
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
import { ScrollViewStyleReset } from 'expo-router/html';
|
|
2
|
+
<% if (props.stylingPackage?.name === "unistyles") { %>
|
|
3
|
+
import '../unistyles';
|
|
4
|
+
<% } %>
|
|
5
|
+
|
|
6
|
+
// This file is web-only and used to configure the root HTML for every
|
|
7
|
+
// web page during static rendering.
|
|
8
|
+
// The contents of this function only run in Node.js environments and
|
|
9
|
+
// do not have access to the DOM or browser APIs.
|
|
10
|
+
export default function Root({ children }: { children: React.ReactNode }) {
|
|
11
|
+
return (
|
|
12
|
+
<html lang="en">
|
|
13
|
+
<head>
|
|
14
|
+
<meta charSet="utf-8" />
|
|
15
|
+
<meta httpEquiv="X-UA-Compatible" content="IE=edge" />
|
|
16
|
+
|
|
17
|
+
{/*
|
|
18
|
+
This viewport disables scaling which makes the mobile website act more like a native app.
|
|
19
|
+
However this does reduce built-in accessibility. If you want to enable scaling, use this instead:
|
|
20
|
+
<meta name="viewport" content="width=device-width, initial-scale=1.0, viewport-fit=cover" />
|
|
21
|
+
*/}
|
|
22
|
+
<meta
|
|
23
|
+
name="viewport"
|
|
24
|
+
content="width=device-width,initial-scale=1,minimum-scale=1,maximum-scale=1.00001,viewport-fit=cover"
|
|
25
|
+
/>
|
|
26
|
+
{/*
|
|
27
|
+
Disable body scrolling on web. This makes ScrollView components work closer to how they do on native.
|
|
28
|
+
However, body scrolling is often nice to have for mobile web. If you want to enable it, remove this line.
|
|
29
|
+
*/}
|
|
30
|
+
<ScrollViewStyleReset />
|
|
31
|
+
|
|
32
|
+
{/* Using raw CSS styles as an escape-hatch to ensure the background color never flickers in dark-mode. */}
|
|
33
|
+
<style dangerouslySetInnerHTML={{ __html: responsiveBackground }} />
|
|
34
|
+
{/* Add any additional <head> elements that you want globally available on web... */}
|
|
35
|
+
</head>
|
|
36
|
+
<body>{children}</body>
|
|
37
|
+
</html>
|
|
38
|
+
);
|
|
39
|
+
}
|
|
40
|
+
|
|
41
|
+
const responsiveBackground = `
|
|
42
|
+
body {
|
|
43
|
+
background-color: #fff;
|
|
44
|
+
}
|
|
45
|
+
@media (prefers-color-scheme: dark) {
|
|
46
|
+
body {
|
|
47
|
+
background-color: #000;
|
|
48
|
+
}
|
|
49
|
+
}`;
|
|
@@ -0,0 +1,100 @@
|
|
|
1
|
+
import { Link, Stack } from 'expo-router';
|
|
2
|
+
<% if (props.stylingPackage?.name === "nativewind" || props.stylingPackage?.name === "uniwind") {%>
|
|
3
|
+
import { Text } from 'react-native';
|
|
4
|
+
|
|
5
|
+
import { Container } from '@/components/Container';
|
|
6
|
+
<% } else if (props.stylingPackage?.name === "restyle" || props.stylingPackage?.name === "tamagui") { %>
|
|
7
|
+
import { StyleSheet, Text } from 'react-native';
|
|
8
|
+
|
|
9
|
+
import { Container } from '@/components/Container';
|
|
10
|
+
<% } else if (props.stylingPackage?.name === "unistyles") { %>
|
|
11
|
+
import { StyleSheet } from 'react-native-unistyles'
|
|
12
|
+
import { Text } from 'react-native';
|
|
13
|
+
|
|
14
|
+
import { Container } from '@/components/Container';
|
|
15
|
+
<% } else if (props.stylingPackage?.name === "stylesheet") { %>
|
|
16
|
+
import { StyleSheet, Text } from 'react-native';
|
|
17
|
+
|
|
18
|
+
import { Container } from '@/components/Container';
|
|
19
|
+
<% } %>
|
|
20
|
+
|
|
21
|
+
export default function NotFoundScreen() {
|
|
22
|
+
|
|
23
|
+
return (
|
|
24
|
+
<% if (props.stylingPackage?.name === "nativewind" || props.stylingPackage?.name === "uniwind") {%>
|
|
25
|
+
<>
|
|
26
|
+
<Stack.Screen options={{ title: "Oops!" }} />
|
|
27
|
+
<Container>
|
|
28
|
+
<Text className={styles.title}>{"This screen doesn't exist."}</Text>
|
|
29
|
+
<Link href="/" className={styles.link}>
|
|
30
|
+
<Text className={styles.linkText}>Go to home screen!</Text>
|
|
31
|
+
</Link>
|
|
32
|
+
</Container>
|
|
33
|
+
</>
|
|
34
|
+
<% } else { %>
|
|
35
|
+
<>
|
|
36
|
+
<Stack.Screen options={{ title: "Oops!" }} />
|
|
37
|
+
<Container>
|
|
38
|
+
<Text style={styles.title}>{"This screen doesn't exist."}</Text>
|
|
39
|
+
<Link href="/" style={styles.link}>
|
|
40
|
+
<Text style={styles.linkText}>Go to home screen!</Text>
|
|
41
|
+
</Link>
|
|
42
|
+
</Container>
|
|
43
|
+
</>
|
|
44
|
+
<% } %>
|
|
45
|
+
);
|
|
46
|
+
}
|
|
47
|
+
|
|
48
|
+
<% if (props.stylingPackage?.name === "nativewind" || props.stylingPackage?.name === "uniwind") { %>
|
|
49
|
+
const styles = {
|
|
50
|
+
title: `text-xl font-bold`,
|
|
51
|
+
link: `mt-4 pt-4`,
|
|
52
|
+
linkText: `text-base text-[#2e78b7]`,
|
|
53
|
+
};
|
|
54
|
+
<% } else if (props.stylingPackage?.name === "unistyles") { %>
|
|
55
|
+
const styles = StyleSheet.create((theme) => ({
|
|
56
|
+
title: {
|
|
57
|
+
fontSize: 20,
|
|
58
|
+
fontWeight: 'bold',
|
|
59
|
+
color: theme.colors.typography,
|
|
60
|
+
},
|
|
61
|
+
link: {
|
|
62
|
+
marginTop: 16,
|
|
63
|
+
paddingVertical: 16,
|
|
64
|
+
},
|
|
65
|
+
linkText: {
|
|
66
|
+
fontSize: 14,
|
|
67
|
+
color: theme.colors.astral,
|
|
68
|
+
},
|
|
69
|
+
}));
|
|
70
|
+
<% } else if (props.stylingPackage?.name === "restyle" || props.stylingPackage?.name === "tamagui") { %>
|
|
71
|
+
const styles = StyleSheet.create({
|
|
72
|
+
title: {
|
|
73
|
+
fontSize: 20,
|
|
74
|
+
fontWeight: 'bold',
|
|
75
|
+
},
|
|
76
|
+
link: {
|
|
77
|
+
marginTop: 16,
|
|
78
|
+
paddingVertical: 16,
|
|
79
|
+
},
|
|
80
|
+
linkText: {
|
|
81
|
+
fontSize: 14,
|
|
82
|
+
color: '#2e78b7',
|
|
83
|
+
},
|
|
84
|
+
});
|
|
85
|
+
<% } else if (props.stylingPackage?.name === "stylesheet") { %>
|
|
86
|
+
const styles = StyleSheet.create({
|
|
87
|
+
title: {
|
|
88
|
+
fontSize: 20,
|
|
89
|
+
fontWeight: 'bold',
|
|
90
|
+
},
|
|
91
|
+
link: {
|
|
92
|
+
marginTop: 16,
|
|
93
|
+
paddingVertical: 16,
|
|
94
|
+
},
|
|
95
|
+
linkText: {
|
|
96
|
+
fontSize: 14,
|
|
97
|
+
color: '#2e78b7',
|
|
98
|
+
},
|
|
99
|
+
});
|
|
100
|
+
<% } %>
|
|
@@ -0,0 +1,91 @@
|
|
|
1
|
+
<% if (props.stylingPackage?.name === "nativewind" || props.stylingPackage?.name === "uniwind") { %>
|
|
2
|
+
import '../global.css';
|
|
3
|
+
import { SafeAreaProvider } from 'react-native-safe-area-context';
|
|
4
|
+
<% } else if (props.stylingPackage?.name === "nativewinui") { %>
|
|
5
|
+
import '../global.css';
|
|
6
|
+
import 'expo-dev-client';
|
|
7
|
+
<% } %>
|
|
8
|
+
|
|
9
|
+
<% if (props.internalizationPackage?.name === "i18next") { %>
|
|
10
|
+
import '../translation';
|
|
11
|
+
<% } %>
|
|
12
|
+
|
|
13
|
+
import 'react-native-gesture-handler';
|
|
14
|
+
import { GestureHandlerRootView } from 'react-native-gesture-handler';
|
|
15
|
+
import { Stack } from 'expo-router';
|
|
16
|
+
|
|
17
|
+
<% if (props.stylingPackage?.name === "unistyles") { %>
|
|
18
|
+
import { useUnistyles } from "react-native-unistyles";
|
|
19
|
+
<% } else if (props.stylingPackage?.name === "restyle") { %>
|
|
20
|
+
import { ThemeProvider } from '@shopify/restyle';
|
|
21
|
+
import { theme } from '../theme';
|
|
22
|
+
<% } else if (props.stylingPackage?.name === "tamagui") { %>
|
|
23
|
+
import { TamaguiProvider } from 'tamagui';
|
|
24
|
+
import config from '../tamagui.config';
|
|
25
|
+
<% } %>
|
|
26
|
+
|
|
27
|
+
<% if (props.analyticsPackage?.name === "vexo-analytics") { %>
|
|
28
|
+
import { vexo } from 'vexo-analytics';
|
|
29
|
+
|
|
30
|
+
const vexoApiKey = process.env.EXPO_PUBLIC_VEXO_API_KEY;
|
|
31
|
+
if (vexoApiKey) {
|
|
32
|
+
vexo(vexoApiKey);
|
|
33
|
+
}
|
|
34
|
+
<% } %>
|
|
35
|
+
|
|
36
|
+
export const unstable_settings = {
|
|
37
|
+
// Ensure that reloading on `/modal` keeps a back button present.
|
|
38
|
+
initialRouteName: "(drawer)",
|
|
39
|
+
};
|
|
40
|
+
|
|
41
|
+
export default function RootLayout() {
|
|
42
|
+
<% if (props.stylingPackage?.name === "unistyles") { %>
|
|
43
|
+
const { theme } = useUnistyles();
|
|
44
|
+
<% } %>
|
|
45
|
+
|
|
46
|
+
return (
|
|
47
|
+
<% if (props.stylingPackage?.name === "restyle") { %>
|
|
48
|
+
<ThemeProvider theme={theme}>
|
|
49
|
+
<% } else if (props.stylingPackage?.name === "tamagui") { %>
|
|
50
|
+
<TamaguiProvider config={config}>
|
|
51
|
+
<% } %>
|
|
52
|
+
<GestureHandlerRootView style={{ flex: 1 }}>
|
|
53
|
+
<% if (props.stylingPackage?.name === "nativewind" || props.stylingPackage?.name === "uniwind") { %>
|
|
54
|
+
<SafeAreaProvider>
|
|
55
|
+
<% } %>
|
|
56
|
+
<% if (props.stylingPackage?.name === "unistyles") { %>
|
|
57
|
+
<Stack
|
|
58
|
+
screenOptions={{
|
|
59
|
+
headerStyle: {
|
|
60
|
+
backgroundColor: theme.colors.background,
|
|
61
|
+
},
|
|
62
|
+
headerTitleStyle: {
|
|
63
|
+
color: theme.colors.typography,
|
|
64
|
+
},
|
|
65
|
+
headerTintColor: theme.colors.typography,
|
|
66
|
+
drawerStyle: {
|
|
67
|
+
backgroundColor: theme.colors.background,
|
|
68
|
+
},
|
|
69
|
+
drawerLabelStyle: {
|
|
70
|
+
color: theme.colors.typography,
|
|
71
|
+
},
|
|
72
|
+
drawerInactiveTintColor: theme.colors.typography,
|
|
73
|
+
}}
|
|
74
|
+
>
|
|
75
|
+
<% } else { %>
|
|
76
|
+
<Stack>
|
|
77
|
+
<% } %>
|
|
78
|
+
<Stack.Screen name="(drawer)" options={{ headerShown: false }} />
|
|
79
|
+
<Stack.Screen name="modal" options={{ title: 'Modal', presentation: 'modal' }} />
|
|
80
|
+
</Stack>
|
|
81
|
+
<% if (props.stylingPackage?.name === "nativewind" || props.stylingPackage?.name === "uniwind") { %>
|
|
82
|
+
</SafeAreaProvider>
|
|
83
|
+
<% } %>
|
|
84
|
+
</GestureHandlerRootView>
|
|
85
|
+
<% if (props.stylingPackage?.name === "restyle") { %>
|
|
86
|
+
</ThemeProvider>
|
|
87
|
+
<% } else if (props.stylingPackage?.name === "tamagui") { %>
|
|
88
|
+
</TamaguiProvider>
|
|
89
|
+
<% } %>
|
|
90
|
+
);
|
|
91
|
+
}
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import { StatusBar } from 'expo-status-bar';
|
|
2
|
+
import { Platform } from 'react-native';
|
|
3
|
+
|
|
4
|
+
import { ScreenContent } from '@/components/ScreenContent';
|
|
5
|
+
|
|
6
|
+
<% if (props.internalizationPackage?.name === "i18next") { %>
|
|
7
|
+
import { InternalizationExample } from 'components/InternalizationExample';
|
|
8
|
+
<% } %>
|
|
9
|
+
|
|
10
|
+
export default function Modal() {
|
|
11
|
+
return (
|
|
12
|
+
<>
|
|
13
|
+
<ScreenContent path="app/modal.tsx" title="Modal">
|
|
14
|
+
<% if (props.internalizationPackage?.name === "i18next") { %>
|
|
15
|
+
<InternalizationExample />
|
|
16
|
+
<% } %>
|
|
17
|
+
</ScreenContent>
|
|
18
|
+
<StatusBar style={Platform.OS === 'ios' ? 'light' : 'auto'} />
|
|
19
|
+
</>
|
|
20
|
+
);
|
|
21
|
+
}
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
// Learn more https://docs.expo.io/guides/customizing-metro
|
|
2
|
+
const { getDefaultConfig } = require('expo/metro-config');
|
|
3
|
+
<% if (["nativewind", "nativewindui"].includes(props.stylingPackage?.name)) { %>
|
|
4
|
+
const { withNativeWind } = require("nativewind/metro");
|
|
5
|
+
<% } else if (props.stylingPackage?.name === "uniwind") { %>
|
|
6
|
+
const { withUniwindConfig } = require("uniwind/metro");
|
|
7
|
+
<% } %>
|
|
8
|
+
|
|
9
|
+
/** @type {import('expo/metro-config').MetroConfig} */
|
|
10
|
+
// eslint-disable-next-line no-undef
|
|
11
|
+
const config = getDefaultConfig(__dirname);
|
|
12
|
+
|
|
13
|
+
<% if (props.stylingPackage?.name === "nativewind") { %>
|
|
14
|
+
module.exports = withNativeWind(config, { input: "./global.css" });
|
|
15
|
+
<% } else if (props.stylingPackage?.name === "nativewindui") { %>
|
|
16
|
+
module.exports = withNativeWind(config, { input: "./global.css", inlineRem: 16 });
|
|
17
|
+
<% } else if (props.stylingPackage?.name === "uniwind") { %>
|
|
18
|
+
module.exports = withUniwindConfig(config, {
|
|
19
|
+
cssEntryFile: "./global.css",
|
|
20
|
+
dtsFile: "./uniwind-types.d.ts"
|
|
21
|
+
});
|
|
22
|
+
<% } else { %>
|
|
23
|
+
module.exports = config;
|
|
24
|
+
<% } %>
|
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
import { ScrollViewStyleReset } from 'expo-router/html';
|
|
2
|
+
<% if (props.stylingPackage?.name === "unistyles") { %>
|
|
3
|
+
import '../unistyles';
|
|
4
|
+
<% } %>
|
|
5
|
+
|
|
6
|
+
// This file is web-only and used to configure the root HTML for every
|
|
7
|
+
// web page during static rendering.
|
|
8
|
+
// The contents of this function only run in Node.js environments and
|
|
9
|
+
// do not have access to the DOM or browser APIs.
|
|
10
|
+
export default function Root({ children }: { children: React.ReactNode }) {
|
|
11
|
+
return (
|
|
12
|
+
<html lang="en">
|
|
13
|
+
<head>
|
|
14
|
+
<meta charSet="utf-8" />
|
|
15
|
+
<meta httpEquiv="X-UA-Compatible" content="IE=edge" />
|
|
16
|
+
|
|
17
|
+
{/*
|
|
18
|
+
This viewport disables scaling which makes the mobile website act more like a native app.
|
|
19
|
+
However this does reduce built-in accessibility. If you want to enable scaling, use this instead:
|
|
20
|
+
<meta name="viewport" content="width=device-width, initial-scale=1.0, viewport-fit=cover" />
|
|
21
|
+
*/}
|
|
22
|
+
<meta
|
|
23
|
+
name="viewport"
|
|
24
|
+
content="width=device-width,initial-scale=1,minimum-scale=1,maximum-scale=1.00001,viewport-fit=cover"
|
|
25
|
+
/>
|
|
26
|
+
{/*
|
|
27
|
+
Disable body scrolling on web. This makes ScrollView components work closer to how they do on native.
|
|
28
|
+
However, body scrolling is often nice to have for mobile web. If you want to enable it, remove this line.
|
|
29
|
+
*/}
|
|
30
|
+
<ScrollViewStyleReset />
|
|
31
|
+
|
|
32
|
+
{/* Using raw CSS styles as an escape-hatch to ensure the background color never flickers in dark-mode. */}
|
|
33
|
+
<style dangerouslySetInnerHTML={{ __html: responsiveBackground }} />
|
|
34
|
+
{/* Add any additional <head> elements that you want globally available on web... */}
|
|
35
|
+
</head>
|
|
36
|
+
<body>{children}</body>
|
|
37
|
+
</html>
|
|
38
|
+
);
|
|
39
|
+
}
|
|
40
|
+
|
|
41
|
+
const responsiveBackground = `
|
|
42
|
+
body {
|
|
43
|
+
background-color: #fff;
|
|
44
|
+
}
|
|
45
|
+
@media (prefers-color-scheme: dark) {
|
|
46
|
+
body {
|
|
47
|
+
background-color: #000;
|
|
48
|
+
}
|
|
49
|
+
}`;
|
|
@@ -0,0 +1,113 @@
|
|
|
1
|
+
import { Link, Stack } from 'expo-router';
|
|
2
|
+
<% if (props.stylingPackage?.name === "nativewind" || props.stylingPackage?.name === "uniwind") {%>
|
|
3
|
+
import { Text, View } from 'react-native';
|
|
4
|
+
|
|
5
|
+
import { Container } from '@/components/Container';
|
|
6
|
+
<% } else if (props.stylingPackage?.name === "restyle" || props.stylingPackage?.name === "tamagui") { %>
|
|
7
|
+
import { StyleSheet, Text, View } from 'react-native';
|
|
8
|
+
|
|
9
|
+
import { Container } from '@/components/Container';
|
|
10
|
+
<% } else if (props.stylingPackage?.name === "unistyles") { %>
|
|
11
|
+
import { StyleSheet } from 'react-native-unistyles'
|
|
12
|
+
import { Text, View } from 'react-native';
|
|
13
|
+
|
|
14
|
+
import { Container } from '@/components/Container';
|
|
15
|
+
<% } else if (props.stylingPackage?.name === "stylesheet") { %>
|
|
16
|
+
import { StyleSheet, Text, View } from 'react-native';
|
|
17
|
+
|
|
18
|
+
import { Container } from '@/components/Container';
|
|
19
|
+
<% } %>
|
|
20
|
+
|
|
21
|
+
export default function NotFoundScreen() {
|
|
22
|
+
|
|
23
|
+
return (
|
|
24
|
+
<% if (props.stylingPackage?.name === "nativewind" || props.stylingPackage?.name === "uniwind") { %>
|
|
25
|
+
<View className={styles.container}>
|
|
26
|
+
<Stack.Screen options={{ title: "Oops!" }} />
|
|
27
|
+
<Container>
|
|
28
|
+
<Text className={styles.title}>{"This screen doesn't exist."}</Text>
|
|
29
|
+
<Link href="/" className={styles.link}>
|
|
30
|
+
<Text className={styles.linkText}>Go to home screen!</Text>
|
|
31
|
+
</Link>
|
|
32
|
+
</Container>
|
|
33
|
+
</View>
|
|
34
|
+
<% } else { %>
|
|
35
|
+
<View style={styles.container}>
|
|
36
|
+
<Stack.Screen options={{ title: "Oops!" }} />
|
|
37
|
+
<Container>
|
|
38
|
+
<Text style={styles.title}>{"This screen doesn't exist."}</Text>
|
|
39
|
+
<Link href="/" style={styles.link}>
|
|
40
|
+
<Text style={styles.linkText}>Go to home screen!</Text>
|
|
41
|
+
</Link>
|
|
42
|
+
</Container>
|
|
43
|
+
</View>
|
|
44
|
+
<% } %>
|
|
45
|
+
);
|
|
46
|
+
}
|
|
47
|
+
|
|
48
|
+
<% if (props.stylingPackage?.name === "nativewind" || props.stylingPackage?.name === "uniwind") { %>
|
|
49
|
+
const styles = {
|
|
50
|
+
container: `flex flex-1 bg-white`,
|
|
51
|
+
title: `text-xl font-bold`,
|
|
52
|
+
link: `mt-4 pt-4`,
|
|
53
|
+
linkText: `text-base text-[#2e78b7]`,
|
|
54
|
+
};
|
|
55
|
+
<% } else if (props.stylingPackage?.name === "unistyles") { %>
|
|
56
|
+
const styles = StyleSheet.create((theme) => ({
|
|
57
|
+
container: {
|
|
58
|
+
flex: 1,
|
|
59
|
+
backgroundColor: 'white',
|
|
60
|
+
},
|
|
61
|
+
title: {
|
|
62
|
+
fontSize: 20,
|
|
63
|
+
fontWeight: 'bold',
|
|
64
|
+
color: theme.colors.typography,
|
|
65
|
+
},
|
|
66
|
+
link: {
|
|
67
|
+
marginTop: 16,
|
|
68
|
+
paddingVertical: 16,
|
|
69
|
+
},
|
|
70
|
+
linkText: {
|
|
71
|
+
fontSize: 14,
|
|
72
|
+
color: theme.colors.astral
|
|
73
|
+
},
|
|
74
|
+
}));
|
|
75
|
+
<% } else if (props.stylingPackage?.name === "restyle" || props.stylingPackage?.name === "tamagui") { %>
|
|
76
|
+
const styles = StyleSheet.create({
|
|
77
|
+
container: {
|
|
78
|
+
flex: 1,
|
|
79
|
+
backgroundColor: 'white',
|
|
80
|
+
},
|
|
81
|
+
title: {
|
|
82
|
+
fontSize: 20,
|
|
83
|
+
fontWeight: 'bold',
|
|
84
|
+
},
|
|
85
|
+
link: {
|
|
86
|
+
marginTop: 16,
|
|
87
|
+
paddingVertical: 16,
|
|
88
|
+
},
|
|
89
|
+
linkText: {
|
|
90
|
+
fontSize: 14,
|
|
91
|
+
color: '#2e78b7',
|
|
92
|
+
},
|
|
93
|
+
});
|
|
94
|
+
<% } else if (props.stylingPackage?.name === "stylesheet") { %>
|
|
95
|
+
const styles = StyleSheet.create({
|
|
96
|
+
container: {
|
|
97
|
+
flex: 1,
|
|
98
|
+
backgroundColor: 'white',
|
|
99
|
+
},
|
|
100
|
+
title: {
|
|
101
|
+
fontSize: 20,
|
|
102
|
+
fontWeight: 'bold',
|
|
103
|
+
},
|
|
104
|
+
link: {
|
|
105
|
+
marginTop: 16,
|
|
106
|
+
paddingVertical: 16,
|
|
107
|
+
},
|
|
108
|
+
linkText: {
|
|
109
|
+
fontSize: 14,
|
|
110
|
+
color: '#2e78b7',
|
|
111
|
+
},
|
|
112
|
+
});
|
|
113
|
+
<% } %>
|
|
@@ -0,0 +1,63 @@
|
|
|
1
|
+
<% if (props.stylingPackage?.name === "nativewind" || props.stylingPackage?.name === "uniwind") { %>
|
|
2
|
+
import '../global.css';
|
|
3
|
+
import { SafeAreaProvider } from 'react-native-safe-area-context';
|
|
4
|
+
<% } %>
|
|
5
|
+
|
|
6
|
+
<% if (props.stylingPackage?.name === "unistyles") { %>
|
|
7
|
+
import { useUnistyles } from "react-native-unistyles";
|
|
8
|
+
<% } else if (props.stylingPackage?.name === "restyle") { %>
|
|
9
|
+
import { ThemeProvider } from '@shopify/restyle';
|
|
10
|
+
import { theme } from '../theme';
|
|
11
|
+
<% } else if (props.stylingPackage?.name === "tamagui") { %>
|
|
12
|
+
import { TamaguiProvider } from 'tamagui';
|
|
13
|
+
import config from '../tamagui.config';
|
|
14
|
+
<% } %>
|
|
15
|
+
<% if (props.internalizationPackage?.name === "i18next") { %>
|
|
16
|
+
import '../translation';
|
|
17
|
+
<% } %>
|
|
18
|
+
import { Stack } from "expo-router";
|
|
19
|
+
|
|
20
|
+
<% if (props.analyticsPackage?.name === "vexo-analytics") { %>
|
|
21
|
+
import { vexo } from 'vexo-analytics';
|
|
22
|
+
|
|
23
|
+
const vexoApiKey = process.env.EXPO_PUBLIC_VEXO_API_KEY;
|
|
24
|
+
if (vexoApiKey) {
|
|
25
|
+
vexo(vexoApiKey);
|
|
26
|
+
}
|
|
27
|
+
<% } %>
|
|
28
|
+
|
|
29
|
+
export default function Layout() {
|
|
30
|
+
<% if (props.stylingPackage?.name === "unistyles") { %>
|
|
31
|
+
const { theme } = useUnistyles();
|
|
32
|
+
<% } %>
|
|
33
|
+
|
|
34
|
+
return (
|
|
35
|
+
<% if (props.stylingPackage?.name === "unistyles") { %>
|
|
36
|
+
<Stack
|
|
37
|
+
screenOptions={{
|
|
38
|
+
headerStyle: {
|
|
39
|
+
backgroundColor: theme.colors.background,
|
|
40
|
+
},
|
|
41
|
+
headerTitleStyle: {
|
|
42
|
+
color: theme.colors.typography,
|
|
43
|
+
},
|
|
44
|
+
headerTintColor: theme.colors.typography
|
|
45
|
+
}}
|
|
46
|
+
/>
|
|
47
|
+
<% } else if (props.stylingPackage?.name === "nativewind" || props.stylingPackage?.name === "uniwind") { %>
|
|
48
|
+
<SafeAreaProvider>
|
|
49
|
+
<Stack />
|
|
50
|
+
</SafeAreaProvider>
|
|
51
|
+
<% } else if (props.stylingPackage?.name === "restyle") { %>
|
|
52
|
+
<ThemeProvider theme={theme}>
|
|
53
|
+
<Stack />
|
|
54
|
+
</ThemeProvider>
|
|
55
|
+
<% } else if (props.stylingPackage?.name === "tamagui") { %>
|
|
56
|
+
<TamaguiProvider config={config}>
|
|
57
|
+
<Stack />
|
|
58
|
+
</TamaguiProvider>
|
|
59
|
+
<% } else { %>
|
|
60
|
+
<Stack />
|
|
61
|
+
<% } %>
|
|
62
|
+
);
|
|
63
|
+
}
|
|
@@ -0,0 +1,56 @@
|
|
|
1
|
+
<% if (props.stylingPackage?.name === "stylesheet" || props.stylingPackage?.name === "restyle" || props.stylingPackage?.name === "tamagui") { %>
|
|
2
|
+
import { StyleSheet, View } from 'react-native';
|
|
3
|
+
<% } else if (props.stylingPackage?.name === "unistyles") { %>
|
|
4
|
+
import { StyleSheet } from 'react-native-unistyles';
|
|
5
|
+
import { View } from 'react-native';
|
|
6
|
+
<% } else { %>
|
|
7
|
+
import { View } from 'react-native';
|
|
8
|
+
<% } %>
|
|
9
|
+
import { Stack, useLocalSearchParams } from 'expo-router';
|
|
10
|
+
|
|
11
|
+
import { Container } from '@/components/Container';
|
|
12
|
+
import { ScreenContent } from '@/components/ScreenContent';
|
|
13
|
+
|
|
14
|
+
export default function Details() {
|
|
15
|
+
const { name } = useLocalSearchParams();
|
|
16
|
+
|
|
17
|
+
return (
|
|
18
|
+
<% if (props.stylingPackage?.name === "nativewind" || props.stylingPackage?.name === "uniwind") { %>
|
|
19
|
+
<View className={styles.container}>
|
|
20
|
+
<% } else { %>
|
|
21
|
+
<View style={styles.container}>
|
|
22
|
+
<% } %>
|
|
23
|
+
<Stack.Screen options={{ title: 'Details' }} />
|
|
24
|
+
<Container>
|
|
25
|
+
<ScreenContent path="screens/details.tsx" title={`Showing details for user ${name}`} />
|
|
26
|
+
</Container>
|
|
27
|
+
</View>
|
|
28
|
+
);
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
<% if (props.stylingPackage?.name === "nativewind" || props.stylingPackage?.name === "uniwind") { %>
|
|
32
|
+
const styles = {
|
|
33
|
+
container: "flex flex-1 bg-white",
|
|
34
|
+
}
|
|
35
|
+
<% } else if (props.stylingPackage?.name === "restyle" || props.stylingPackage?.name === "tamagui") { %>
|
|
36
|
+
const styles = StyleSheet.create({
|
|
37
|
+
container: {
|
|
38
|
+
flex: 1,
|
|
39
|
+
backgroundColor: 'white',
|
|
40
|
+
},
|
|
41
|
+
});
|
|
42
|
+
<% } else if (props.stylingPackage?.name === "stylesheet") { %>
|
|
43
|
+
const styles = StyleSheet.create({
|
|
44
|
+
container: {
|
|
45
|
+
flex: 1,
|
|
46
|
+
backgroundColor: 'white',
|
|
47
|
+
},
|
|
48
|
+
});
|
|
49
|
+
<% } else if (props.stylingPackage?.name === "unistyles") { %>
|
|
50
|
+
const styles = StyleSheet.create((theme) => ({
|
|
51
|
+
container: {
|
|
52
|
+
flex: 1,
|
|
53
|
+
backgroundColor: 'white',
|
|
54
|
+
},
|
|
55
|
+
}));
|
|
56
|
+
<% } %>
|