create-expo-stack 2.5.0-next.738ca1b → 2.5.0-next.7acc023

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.
Files changed (57) hide show
  1. package/README.md +208 -151
  2. package/build/templates/base/App.tsx.ejs +44 -110
  3. package/build/templates/base/components/BackButton.tsx.ejs +23 -0
  4. package/build/templates/base/components/Button.tsx.ejs +40 -0
  5. package/build/templates/base/components/EditScreenInfo.tsx.ejs +55 -0
  6. package/build/templates/base/components/HeaderButton.tsx.ejs +28 -0
  7. package/build/templates/base/components/ScreenContent.tsx.ejs +38 -0
  8. package/build/templates/base/components/TabBarIcon.tsx.ejs +15 -0
  9. package/build/templates/packages/expo-router/drawer/app/(drawer)/(tabs)/_layout.tsx.ejs +1 -13
  10. package/build/templates/packages/expo-router/drawer/app/(drawer)/(tabs)/index.tsx.ejs +18 -84
  11. package/build/templates/packages/expo-router/drawer/app/(drawer)/(tabs)/two.tsx.ejs +18 -84
  12. package/build/templates/packages/expo-router/drawer/app/(drawer)/_layout.tsx.ejs +4 -18
  13. package/build/templates/packages/expo-router/drawer/app/(drawer)/index.tsx.ejs +12 -98
  14. package/build/templates/packages/expo-router/drawer/app/modal.tsx.ejs +16 -92
  15. package/build/templates/packages/expo-router/stack/app/details.tsx.ejs +17 -171
  16. package/build/templates/packages/expo-router/stack/app/index.tsx.ejs +20 -202
  17. package/build/templates/packages/expo-router/tabs/app/(tabs)/_layout.tsx.ejs +6 -50
  18. package/build/templates/packages/expo-router/tabs/app/(tabs)/index.tsx.ejs +18 -102
  19. package/build/templates/packages/expo-router/tabs/app/(tabs)/two.tsx.ejs +18 -83
  20. package/build/templates/packages/expo-router/tabs/app/modal.tsx.ejs +17 -92
  21. package/build/templates/packages/i18next/components/InternalizationExample.tsx.ejs +1 -1
  22. package/build/templates/packages/i18next/translation/en.json.ejs +3 -3
  23. package/build/templates/packages/i18next/translation/fr.json.ejs +3 -3
  24. package/build/templates/packages/nativewind/components/BackButton.tsx.ejs +18 -0
  25. package/build/templates/packages/nativewind/components/Button.tsx.ejs +14 -0
  26. package/build/templates/packages/nativewind/components/EditScreenInfo.tsx.ejs +40 -0
  27. package/build/templates/packages/nativewind/components/ScreenContent.tsx.ejs +25 -0
  28. package/build/templates/packages/react-navigation/App.tsx.ejs +1 -1
  29. package/build/templates/packages/react-navigation/navigation/drawer-navigator.tsx.ejs +14 -26
  30. package/build/templates/packages/react-navigation/navigation/index.tsx.ejs +2 -101
  31. package/build/templates/packages/react-navigation/navigation/tab-navigator.tsx.ejs +8 -62
  32. package/build/templates/packages/react-navigation/screens/details.tsx.ejs +22 -108
  33. package/build/templates/packages/react-navigation/screens/home.tsx.ejs +3 -100
  34. package/build/templates/packages/react-navigation/screens/modal.tsx.ejs +16 -104
  35. package/build/templates/packages/react-navigation/screens/one.tsx.ejs +2 -115
  36. package/build/templates/packages/react-navigation/screens/overview.tsx.ejs +37 -199
  37. package/build/templates/packages/react-navigation/screens/two.tsx.ejs +3 -98
  38. package/build/templates/packages/restyle/components/BackButton.tsx.ejs +15 -0
  39. package/build/templates/packages/restyle/components/Button.tsx.ejs +32 -0
  40. package/build/templates/packages/restyle/components/EditScreenInfo.tsx.ejs +29 -0
  41. package/build/templates/packages/restyle/components/ScreenContent.tsx.ejs +20 -0
  42. package/build/templates/packages/tamagui/components/BackButton.tsx.ejs +19 -0
  43. package/build/templates/packages/tamagui/components/Button.tsx.ejs +9 -0
  44. package/build/templates/packages/tamagui/components/EditScreenInfo.tsx.ejs +29 -0
  45. package/build/templates/packages/tamagui/components/ScreenContent.tsx.ejs +22 -0
  46. package/build/templates/packages/unistyles/components/BackButton.tsx.ejs +26 -0
  47. package/build/templates/packages/unistyles/components/Button.tsx.ejs +12 -0
  48. package/build/templates/packages/unistyles/components/EditScreenInfo.tsx.ejs +61 -0
  49. package/build/templates/packages/unistyles/components/ScreenContent.tsx.ejs +24 -0
  50. package/build/templates/packages/unistyles/theme.ts.ejs +30 -46
  51. package/build/utilities/configureProjectFiles.js +68 -10
  52. package/build/utilities/generateProjectFiles.js +2 -2
  53. package/build/utilities/showHelp.js +3 -3
  54. package/package.json +1 -1
  55. package/build/templates/packages/expo-router/drawer/components/edit-screen-info.tsx.ejs +0 -153
  56. package/build/templates/packages/expo-router/tabs/components/edit-screen-info.tsx.ejs +0 -153
  57. package/build/templates/packages/react-navigation/components/edit-screen-info.tsx.ejs +0 -180
package/README.md CHANGED
@@ -12,14 +12,20 @@
12
12
 
13
13
  ## Sponsors
14
14
 
15
- NativeWind
16
- Restyle
17
- StyleSheets
18
- Tamagui
19
-
20
15
  Support this project by <a href="https://github.com/sponsors/danstepanov" target="_blank">becoming a sponsor</a>. Your logo will show up here with a link to your website.
21
16
 
22
- <a href="https://galaxies.dev/" target="_blank" style="margin-top: 10px;margin-right: 10px; margin-bottom: 10px;" ><img src="https://expostack.dev/galaxies-logo.svg" style="border-radius: 50%;"></a> <a href="https://expo.dev/" target="_blank" style="margin: 10px;"><img src="https://expostack.dev/expo-logo.svg" style="border-radius: 50%;"></a>
17
+ <a href="https://galaxies.dev/" target="_blank" style="margin-top: 10px;margin-right: 10px; margin-bottom: 10px;" >
18
+ <img src="https://expostack.dev/galaxies-logo.svg" style="border-radius: 50%;">
19
+ </a>
20
+ <a href="https://expo.dev/" target="_blank" style="margin: 10px;">
21
+ <img src="https://expostack.dev/expo-logo.svg" style="border-radius: 50%;">
22
+ </a>
23
+ <a href="https://github.com/derkweijers" target="_blank" style="margin: 10px;">
24
+ <img src="https://avatars.githubusercontent.com/u/11644998?v=4" height="64" width="64" style="border-radius: 50%;">
25
+ </a>
26
+ <a href="https://paradigmpost.com" target="_blank" style="margin: 10px;">
27
+ <img src="https://expostack.dev/paradigmpost.png" height="64" width="64" style="border-radius: 50%;">
28
+ </a>
23
29
 
24
30
  ## Description
25
31
 
@@ -84,153 +90,204 @@ If you'd like help with your React Native/Expo app or are just looking for a tec
84
90
 
85
91
  Thanks go to these wonderful people:
86
92
 
93
+ <!-- readme: contributors -start -->
87
94
  <table>
88
- <tbody>
89
- <tr>
90
- <td align="center" valign="top" width="14.28%">
91
- <a href="https://onlydans.gg/">
92
- <img src="https://pbs.twimg.com/profile_images/1689473757713514496/8fQrCrBx_400x400.jpg" width="100px;" alt="Dan Stepanov"/>
93
- <br />
94
- Dan Stepanov
95
- </a>
96
- </td>
97
- <td align="center" valign="top" width="14.28%">
98
- <a href="https://twitter.com/ernestodotgg">
99
- <img src="https://pbs.twimg.com/profile_images/1647055447931617285/RPeZJI3z_400x400.jpg" width="100px;" alt="Ernesto Resende"/>
100
- <br />
101
- Ernesto Resende
102
- </a>
103
- </td>
104
- <td align="center" valign="top" width="14.28%">
105
- <a href="https://github.com/hqasmei">
106
- <img src="https://avatars.githubusercontent.com/u/39573679?v=4" width="100px;" alt="Hosna Qasmei"/>
107
- <br />
108
- Hosna Qasmei
109
- </a>
110
- </td>
111
- <td align="center" valign="top" width="14.28%">
112
- <a href="https://github.com/frankcalise/">
113
- <img src="https://pbs.twimg.com/profile_images/1262363198839238662/uIfRNVBY_400x400.jpg" width="100px;" alt="Frank Calise"/>
114
- <br />
115
- Frank Calise
116
- </a>
117
- </td>
118
- </tr>
119
- <tr>
120
- <td align="center" valign="top" width="14.28%">
121
- <a href="https://github.com/sammoore">
122
- <img src="https://avatars.githubusercontent.com/u/2035492?v=4" width="100px;" alt="Sam Moore"/>
123
- <br />
124
- Sam Moore
125
- </a>
126
- </td>
127
- <td align="center" valign="top" width="14.28%">
128
- <a href="https://twitter.com/mironcatalin">
129
- <img src="https://avatars.githubusercontent.com/u/2805320?v=4" width="100px;" alt="Catalin Miron"/>
130
- <br />
131
- Catalin Miron
132
- </a>
133
- </td>
134
- <td align="center" valign="top" width="14.28%">
135
- <a href="https://twitter.com/PickleNik0864">
136
- <img src="https://pbs.twimg.com/profile_images/1694518037385244672/eaS0RTwB_400x400.jpg" width="100px;" alt="catalinmiron"/>
137
- <br />
138
- PickleNik
139
- </a>
140
- </td>
141
- <td align="center" valign="top" width="14.28%">
142
- <a href="https://twitter.com/trashh_dev">
143
- <img src="https://pbs.twimg.com/profile_images/1598959528518643713/aWdwBYxv_400x400.jpg" width="100px;" alt="Chris Bautista"/>
144
- <br />
145
- Chris Bautista
146
- </a>
147
- </td>
148
- </tr>
149
- <tr>
150
- <td align="center" valign="top" width="14.28%">
151
- <a href="https://twitter.com/hugemathguy">
152
- <img src="https://pbs.twimg.com/profile_images/1503470123763617796/49xDaART_400x400.jpg" width="100px;" alt="Andrew Levy"/>
153
- <br />
154
- Andrew Levy
155
- </a>
156
- </td>
157
- <td align="center" valign="top" width="14.28%">
158
- <a href="https://twitter.com/alire74_">
159
- <img src="https://pbs.twimg.com/profile_images/1680836863026765824/lrljy0sl_400x400.jpg" width="100px;" alt="Ali Zamani"/>
160
- <br />
161
- Ali Zamani
162
- </a>
163
- </td>
164
- <td align="center" valign="top" width="14.28%">
165
- <a href="https://github.com/saimon24">
166
- <img src="https://avatars.githubusercontent.com/u/2514208?v=4" width="100px;" alt="Simon Grimm"/>
167
- <br />
168
- Simon Grimm
169
- </a>
170
- </td>
171
- <td align="center" valign="top" width="14.28%">
172
- <a href="https://twitter.com/mwarger">
173
- <img src="https://avatars.githubusercontent.com/u/686823?v=4" width="100px;" alt="Mat Warger"/>
174
- <br />
175
- Mat Warger
176
- </a>
177
- </td>
178
- </tr>
179
- <tr>
180
- <td align="center" valign="top" width="14.28%">
181
- <a href="https://github.com/kratos-respawned">
182
- <img src="https://avatars.githubusercontent.com/u/87561983?v=4" width="100px;" alt="kratos-respawned"/>
183
- <br />
184
- Gaurav Bhandari
185
- </a>
186
- </td>
187
- <td align="center" valign="top" width="14.28%">
188
- <a href="https://github.com/b0iq">
189
- <img src="https://avatars.githubusercontent.com/u/106549013?v=4" width="100px;" alt="b0iq"/>
190
- <br />
191
- b0iq
192
- </a>
193
- </td>
194
- <td align="center" valign="top" width="14.28%">
195
- <a href="https://aodhan.netlify.app/">
196
- <img src="https://pbs.twimg.com/profile_images/1472990183993888772/3X5J4d9__400x400.png" width="100px;" alt="Aodhan Hamilton"/>
197
- <br />
198
- Aodhan Hamilton
199
- </a>
200
- </td>
201
- <td align="center" valign="top" width="14.28%">
202
- <a href="https://github.com/finnbayer">
203
- <img src="https://avatars.githubusercontent.com/u/115630860?v=4" width="100px;" alt="finnbayer"/>
204
- <br />
205
- Finn Bayer
206
- </a>
207
- </td>
208
- </tr>
209
- <tr>
210
- <td align="center" valign="top" width="14.28%">
211
- <a href="https://github.com/todevmilen">
212
- <img src="https://avatars.githubusercontent.com/u/78319110?v=4" width="100px;" alt="todevmilen"/>
213
- <br />
214
- Milen Todev
215
- </a>
216
- </td>
217
- <td align="center" valign="top" width="14.28%">
218
- <a href="https://github.com/gialencar">
219
- <img src="https://avatars.githubusercontent.com/u/11895696?v=4" width="100px;" alt="gialencar"/>
220
- <br />
221
- Gilson Alencar
222
- </a>
223
- </td>
224
- <td align="center" valign="top" width="14.28%">
225
- <a href="https://github.com/Joehoel">
226
- <img src="https://avatars.githubusercontent.com/u/31251240?v=4" width="100px;" alt="joehoel"/>
227
- <br />
228
- Joël Kuijper
229
- </a>
230
- </td>
231
- </tr>
232
- </tbody>
95
+ <tr>
96
+ <td align="center">
97
+ <a href="https://github.com/danstepanov">
98
+ <img src="https://avatars.githubusercontent.com/u/5482800?v=4" width="100;" alt="danstepanov"/>
99
+ <br />
100
+ <sub><b>Dan Stepanov</b></sub>
101
+ </a>
102
+ </td>
103
+ <td align="center">
104
+ <a href="https://github.com/hqasmei">
105
+ <img src="https://avatars.githubusercontent.com/u/39573679?v=4" width="100;" alt="hqasmei"/>
106
+ <br />
107
+ <sub><b>Hosna Qasmei</b></sub>
108
+ </a>
109
+ </td>
110
+ <td align="center">
111
+ <a href="https://github.com/sammoore">
112
+ <img src="https://avatars.githubusercontent.com/u/2035492?v=4" width="100;" alt="sammoore"/>
113
+ <br />
114
+ <sub><b>Sam Moore</b></sub>
115
+ </a>
116
+ </td>
117
+ <td align="center">
118
+ <a href="https://github.com/ernestoresende">
119
+ <img src="https://avatars.githubusercontent.com/u/55156145?v=4" width="100;" alt="ernestoresende"/>
120
+ <br />
121
+ <sub><b>Ernesto Resende</b></sub>
122
+ </a>
123
+ </td>
124
+ <td align="center">
125
+ <a href="https://github.com/frankcalise">
126
+ <img src="https://avatars.githubusercontent.com/u/374022?v=4" width="100;" alt="frankcalise"/>
127
+ <br />
128
+ <sub><b>Frank Calise</b></sub>
129
+ </a>
130
+ </td>
131
+ <td align="center">
132
+ <a href="https://github.com/ludwig-pro">
133
+ <img src="https://avatars.githubusercontent.com/u/62896243?v=4" width="100;" alt="ludwig-pro"/>
134
+ <br />
135
+ <sub><b>Ludwig</b></sub>
136
+ </a>
137
+ </td></tr>
138
+ <tr>
139
+ <td align="center">
140
+ <a href="https://github.com/PickleNik">
141
+ <img src="https://avatars.githubusercontent.com/u/31113245?v=4" width="100;" alt="PickleNik"/>
142
+ <br />
143
+ <sub><b>Null</b></sub>
144
+ </a>
145
+ </td>
146
+ <td align="center">
147
+ <a href="https://github.com/kratos-respawned">
148
+ <img src="https://avatars.githubusercontent.com/u/87561983?v=4" width="100;" alt="kratos-respawned"/>
149
+ <br />
150
+ <sub><b>Gaurav Bhandari</b></sub>
151
+ </a>
152
+ </td>
153
+ <td align="center">
154
+ <a href="https://github.com/finnbayer">
155
+ <img src="https://avatars.githubusercontent.com/u/115630860?v=4" width="100;" alt="finnbayer"/>
156
+ <br />
157
+ <sub><b>Finn Bayer</b></sub>
158
+ </a>
159
+ </td>
160
+ <td align="center">
161
+ <a href="https://github.com/saimon24">
162
+ <img src="https://avatars.githubusercontent.com/u/2514208?v=4" width="100;" alt="saimon24"/>
163
+ <br />
164
+ <sub><b>Simon Grimm</b></sub>
165
+ </a>
166
+ </td>
167
+ <td align="center">
168
+ <a href="https://github.com/todevmilen">
169
+ <img src="https://avatars.githubusercontent.com/u/78319110?v=4" width="100;" alt="todevmilen"/>
170
+ <br />
171
+ <sub><b>Milen Todev</b></sub>
172
+ </a>
173
+ </td>
174
+ <td align="center">
175
+ <a href="https://github.com/alitnk">
176
+ <img src="https://avatars.githubusercontent.com/u/35243344?v=4" width="100;" alt="alitnk"/>
177
+ <br />
178
+ <sub><b>Alireza Zamani</b></sub>
179
+ </a>
180
+ </td></tr>
181
+ <tr>
182
+ <td align="center">
183
+ <a href="https://github.com/dannyhw">
184
+ <img src="https://avatars.githubusercontent.com/u/3481514?v=4" width="100;" alt="dannyhw"/>
185
+ <br />
186
+ <sub><b>Daniel Williams</b></sub>
187
+ </a>
188
+ </td>
189
+ <td align="center">
190
+ <a href="https://github.com/catalinmiron">
191
+ <img src="https://avatars.githubusercontent.com/u/2805320?v=4" width="100;" alt="catalinmiron"/>
192
+ <br />
193
+ <sub><b>Catalin Miron</b></sub>
194
+ </a>
195
+ </td>
196
+ <td align="center">
197
+ <a href="https://github.com/b0iq">
198
+ <img src="https://avatars.githubusercontent.com/u/106549013?v=4" width="100;" alt="b0iq"/>
199
+ <br />
200
+ <sub><b>Null</b></sub>
201
+ </a>
202
+ </td>
203
+ <td align="center">
204
+ <a href="https://github.com/coyksdev">
205
+ <img src="https://avatars.githubusercontent.com/u/19565694?v=4" width="100;" alt="coyksdev"/>
206
+ <br />
207
+ <sub><b>Gerald</b></sub>
208
+ </a>
209
+ </td>
210
+ <td align="center">
211
+ <a href="https://github.com/andrew-levy">
212
+ <img src="https://avatars.githubusercontent.com/u/29075740?v=4" width="100;" alt="andrew-levy"/>
213
+ <br />
214
+ <sub><b>Andrew Levy</b></sub>
215
+ </a>
216
+ </td>
217
+ <td align="center">
218
+ <a href="https://github.com/gialencar">
219
+ <img src="https://avatars.githubusercontent.com/u/11895696?v=4" width="100;" alt="gialencar"/>
220
+ <br />
221
+ <sub><b>Gilson Alencar</b></sub>
222
+ </a>
223
+ </td></tr>
224
+ <tr>
225
+ <td align="center">
226
+ <a href="https://github.com/mwarger">
227
+ <img src="https://avatars.githubusercontent.com/u/686823?v=4" width="100;" alt="mwarger"/>
228
+ <br />
229
+ <sub><b>Mat Warger</b></sub>
230
+ </a>
231
+ </td>
232
+ <td align="center">
233
+ <a href="https://github.com/gabimoncha">
234
+ <img src="https://avatars.githubusercontent.com/u/39256258?v=4" width="100;" alt="gabimoncha"/>
235
+ <br />
236
+ <sub><b>Gabimoncha</b></sub>
237
+ </a>
238
+ </td>
239
+ <td align="center">
240
+ <a href="https://github.com/gwenoleR">
241
+ <img src="https://avatars.githubusercontent.com/u/10418241?v=4" width="100;" alt="gwenoleR"/>
242
+ <br />
243
+ <sub><b>Null</b></sub>
244
+ </a>
245
+ </td>
246
+ <td align="center">
247
+ <a href="https://github.com/zamplyy">
248
+ <img src="https://avatars.githubusercontent.com/u/26258710?v=4" width="100;" alt="zamplyy"/>
249
+ <br />
250
+ <sub><b>Joar Karlsson</b></sub>
251
+ </a>
252
+ </td>
253
+ <td align="center">
254
+ <a href="https://github.com/Joehoel">
255
+ <img src="https://avatars.githubusercontent.com/u/31251240?v=4" width="100;" alt="Joehoel"/>
256
+ <br />
257
+ <sub><b>Joël Kuijper</b></sub>
258
+ </a>
259
+ </td>
260
+ <td align="center">
261
+ <a href="https://github.com/asapMaki">
262
+ <img src="https://avatars.githubusercontent.com/u/30200380?v=4" width="100;" alt="asapMaki"/>
263
+ <br />
264
+ <sub><b>Mahir Kadić</b></sub>
265
+ </a>
266
+ </td></tr>
267
+ <tr>
268
+ <td align="center">
269
+ <a href="https://github.com/Hacksore">
270
+ <img src="https://avatars.githubusercontent.com/u/996134?v=4" width="100;" alt="Hacksore"/>
271
+ <br />
272
+ <sub><b>Sean Boult</b></sub>
273
+ </a>
274
+ </td>
275
+ <td align="center">
276
+ <a href="https://github.com/bautistaaa">
277
+ <img src="https://avatars.githubusercontent.com/u/3660667?v=4" width="100;" alt="bautistaaa"/>
278
+ <br />
279
+ <sub><b>Null</b></sub>
280
+ </a>
281
+ </td>
282
+ <td align="center">
283
+ <a href="https://github.com/debugtheworldbot">
284
+ <img src="https://avatars.githubusercontent.com/u/62830430?v=4" width="100;" alt="debugtheworldbot"/>
285
+ <br />
286
+ <sub><b>Pipizhu</b></sub>
287
+ </a>
288
+ </td></tr>
233
289
  </table>
290
+ <!-- readme: contributors -end -->
234
291
 
235
292
  [downloads-image]: https://img.shields.io/npm/dm/create-expo-stack?color=364fc7&logoColor=364fc7
236
293
  [npm-url]: https://www.npmjs.com/package/create-expo-stack
@@ -1,127 +1,61 @@
1
- <% if (props.stylingPackage?.name === "nativewind") { %>
2
- import './global.css';
3
- <% } %>
4
- import React from 'react';
5
-
6
- <% if (props.stylingPackage?.name === "nativewind") {%>
7
- import { Text, View } from 'react-native';
8
- <% } else if (props.stylingPackage?.name === "tamagui") {%>
9
- import { View } from 'react-native';
10
- import { TamaguiProvider, Text, styled } from 'tamagui';
11
- import config from './tamagui.config'
12
- <% } else if (props.stylingPackage?.name === "restyle") {%>
13
- import { ThemeProvider } from '@shopify/restyle';
14
- import {theme, Text} from './theme';
15
- <% } else if (props.stylingPackage?.name === "unistyles") {%>
16
- import { createStyleSheet, useStyles } from 'react-native-unistyles'
17
- import { Text, View } from 'react-native';
18
- <% } else {%>
19
- import { StyleSheet, Text, View } from 'react-native';
20
- <% } %>
1
+ import { ScreenContent } from 'components/ScreenContent';
2
+ import { StatusBar } from 'expo-status-bar';
21
3
 
22
4
  <% if (props.internalizationPackage?.name === "i18next") { %>
23
- import { InternalizationExample } from 'components/InternalizationExample';
24
-
25
5
  import './translation';
6
+ import { InternalizationExample } from 'components/InternalizationExample';
26
7
  <% } %>
27
8
 
9
+ <% if (props.stylingPackage?.name === "nativewind") { %>
10
+ import './global.css';
11
+ <% } else if (props.stylingPackage?.name === "restyle") { %>
12
+ import { ThemeProvider } from '@shopify/restyle';
13
+ import { theme } from 'theme';
14
+ <% } else if (props.stylingPackage?.name === "tamagui") { %>
15
+ import { TamaguiProvider } from 'tamagui';
16
+ import config from './tamagui.config';
17
+ <% } %>
28
18
 
29
- import { StatusBar } from 'expo-status-bar';
30
-
31
- <% if (props.stylingPackage?.name === "nativewind") {%>
32
- export default function App() {
33
- return (
34
- <View className={styles.container}>
35
- <% if (props.internalizationPackage?.name === "i18next") { %>
36
- <InternalizationExample />
37
- <% } else { %>
38
- <Text>Open up App.tsx to start working on your app!</Text>
39
- <% } %>
40
- <StatusBar style="auto" />
41
- </View >
42
- );
43
- }
44
-
45
- const styles = {
46
- container: 'flex flex-1 items-center justify-center bg-white',
47
- };
48
- <% } else if (props.stylingPackage?.name === "tamagui") {%>
49
- const MyView = styled(View, {
50
- name: "MyView",
51
- flex: 1,
52
- alignItems: 'center',
53
- justifyContent: 'center',
54
- });
55
-
56
- export default function App() {
57
- return (
58
- <TamaguiProvider config={config}>
59
- <MyView>
60
- <Text>Open up App.tsx to start working on your app!</Text>
19
+ <% if (props.stylingPackage?.name === "restyle") {%>
20
+ export default function App() {
21
+ return (
22
+ <ThemeProvider theme={theme}>
23
+ <ScreenContent title="Home" path="App.tsx">
61
24
  <% if (props.internalizationPackage?.name === "i18next") { %>
62
25
  <InternalizationExample />
63
26
  <% } %>
64
- <StatusBar style="auto" />
65
- </MyView>
66
- </TamaguiProvider >
67
- );
68
- }
69
- <% } else if (props.stylingPackage?.name === "restyle") {%>
70
- export default function App() {
71
- return (
72
- <ThemeProvider theme={theme}>
27
+ </ScreenContent>
28
+ <StatusBar style="auto" />
29
+ </ThemeProvider>
30
+ );
31
+ }
32
+ <% } else if (props.stylingPackage?.name === "tamagui") {%>
33
+ export default function App() {
34
+ return (
35
+ <TamaguiProvider config={config}>
36
+ <ScreenContent title="Home" path="App.tsx">
73
37
  <% if (props.internalizationPackage?.name === "i18next") { %>
74
38
  <InternalizationExample />
75
39
  <% } else { %>
76
- <Text>Open up App.tsx to start working on your app!</Text>
40
+ <Text>Open up App.tsx to start working on your app!</Text>
77
41
  <% } %>
78
- <StatusBar style="auto" />
79
- </ThemeProvider>
80
- );
81
- }
82
- <% } else if (props.stylingPackage?.name === "unistyles") {%>
83
- export default function App() {
84
- const {styles} = useStyles(stylesheet)
85
- return (
86
- <View style={styles.container}>
87
- <% if (props.internalizationPackage?.name === "i18next") { %>
88
- <InternalizationExample />
89
- <% } else { %>
90
- <Text>Open up App.tsx to start working on your app!</Text>
91
- <% } %>
92
- <StatusBar style="auto" />
93
- </View >
94
- );
95
- }
96
-
97
- const stylesheet = createStyleSheet({
98
- container: {
99
- flex: 1,
100
- backgroundColor: '#fff',
101
- alignItems: 'center',
102
- justifyContent: 'center',
103
- },
104
- });
105
- <% } else {%>
106
- export default function App() {
107
- return (
108
- <View style={styles.container}>
42
+ </ScreenContent>
43
+ <StatusBar style="auto" />
44
+ </TamaguiProvider>
45
+ );
46
+ }
47
+ <% } else { %>
48
+ export default function App() {
49
+ return (
50
+ <>
51
+ <ScreenContent title="Home" path="App.tsx">
109
52
  <% if (props.internalizationPackage?.name === "i18next") { %>
110
53
  <InternalizationExample />
111
- <% } else { %>
112
- <Text>Open up App.tsx to start working on your app!</Text>
113
54
  <% } %>
114
- <StatusBar style="auto" />
115
- </View >
116
- );
117
- }
55
+ </ScreenContent>
56
+ <StatusBar style="auto" />
57
+ </>
58
+ );
59
+ }
60
+ <% } %>
118
61
 
119
- const styles = StyleSheet.create({
120
- container: {
121
- flex: 1,
122
- backgroundColor: '#fff',
123
- alignItems: 'center',
124
- justifyContent: 'center',
125
- },
126
- });
127
- <% } %>
@@ -0,0 +1,23 @@
1
+ import { Feather } from '@expo/vector-icons';
2
+ import { Text, View, StyleSheet } from 'react-native';
3
+
4
+ export const BackButton = ({ onPress }: { onPress: () => void }) => {
5
+ return (
6
+ <View style={styles.backButton}>
7
+ <Feather name="chevron-left" size={16} color="#007AFF" />
8
+ <Text style={styles.backButtonText} onPress={onPress}>
9
+ Back
10
+ </Text>
11
+ </View>
12
+ );
13
+ };
14
+ const styles = StyleSheet.create({
15
+ backButton: {
16
+ flexDirection: 'row',
17
+ paddingLeft: 20,
18
+ },
19
+ backButtonText: {
20
+ color: '#007AFF',
21
+ marginLeft: 4,
22
+ },
23
+ });
@@ -0,0 +1,40 @@
1
+ import { forwardRef } from 'react';
2
+ import { StyleSheet, Text, TouchableOpacity, TouchableOpacityProps } from 'react-native';
3
+
4
+ type ButtonProps = {
5
+ onPress?: TouchableOpacityProps['onPress'];
6
+ title?: string;
7
+ } & TouchableOpacityProps;
8
+
9
+ export const Button = forwardRef<TouchableOpacity, ButtonProps>(({ onPress, title }, ref) => {
10
+ return (
11
+ <TouchableOpacity ref={ref} style={styles.button} onPress={onPress}>
12
+ <Text style={styles.buttonText}>{title}</Text>
13
+ </TouchableOpacity>
14
+ );
15
+ });
16
+
17
+ const styles = StyleSheet.create({
18
+ button: {
19
+ alignItems: 'center',
20
+ backgroundColor: '#6366F1',
21
+ borderRadius: 24,
22
+ elevation: 5,
23
+ flexDirection: 'row',
24
+ justifyContent: 'center',
25
+ padding: 16,
26
+ shadowColor: '#000',
27
+ shadowOffset: {
28
+ height: 2,
29
+ width: 0,
30
+ },
31
+ shadowOpacity: 0.25,
32
+ shadowRadius: 3.84,
33
+ },
34
+ buttonText: {
35
+ color: '#FFFFFF',
36
+ fontSize: 16,
37
+ fontWeight: '600',
38
+ textAlign: 'center',
39
+ },
40
+ });