@@ -4,11 +4,7 @@ import { FlashList } from '@shopify/flash-list';
4
4
import { cssInterop } from 'nativewind';
5
5
import * as React from 'react';
6
6
import {
7
- <% if (props .stylingPackage ? .options .selectedComponents .includes (' alert' )) { % >
8
- Alert,
9
- < % } % >
10
7
<% if (
11
- props .stylingPackage ? .options .selectedComponents .includes (' alert' ) ||
12
8
props .stylingPackage ? .options .selectedComponents .includes (' action-sheet' ) ||
13
9
props .stylingPackage ? .options .selectedComponents .includes (' activity-view' ) ||
14
10
props .stylingPackage ? .options .selectedComponents .includes (' bottom-sheet' )
@@ -17,12 +13,9 @@ import {
17
13
ButtonProps,
18
14
< % } % >
19
15
Linking,
20
- < % if (props .stylingPackage ? .options .selectedComponents .includes (' alert ' ) || props . stylingPackage ? . options . selectedComponents . includes ( ' bottom-sheet' )) { % >
16
+ < % if (props .stylingPackage ? .options .selectedComponents .includes (' bottom-sheet' )) { % >
21
17
Platform,
22
18
< % } % >
23
- < % if (props .stylingPackage ? .options .selectedComponents .includes (' dropdown-menu' )) { % >
24
- Pressable,
25
- < % } % >
26
19
< % if (props .stylingPackage ? .options .selectedComponents .includes (' activity-view' )) { % >
27
20
Share,
28
21
< % } % >
@@ -37,12 +30,6 @@ import { Icon } from '@roninoss/icons';
37
30
< % if (props .stylingPackage ? .options .selectedComponents .includes (' ratings-indicator' )) { % >
38
31
import * as StoreReview from ' expo-store-review' ;
39
32
< % } % >
40
- < % if (props .stylingPackage ? .options .selectedComponents .includes (' context-menu' )) { % >
41
- import * as ContextMenu from ' zeego/context-menu' ;
42
- < % } % >
43
- < % if (props .stylingPackage ? .options .selectedComponents .includes (' dropdown-menu' )) { % >
44
- import * as DropdownMenu from ' zeego/dropdown-menu' ;
45
- < % } % >
46
33
47
34
import { Container } from ' ~/components/Container' ;
48
35
< % if (props .stylingPackage ? .options .selectedComponents .includes (' activity-indicator' )) { % >
@@ -112,7 +99,6 @@ cssInterop(FlashList, {
112
99
contentContainerClassName: ' contentContainerStyle' ,
113
100
});
114
101
< % if (
115
- props .stylingPackage ? .options .selectedComponents .includes (' alert' ) ||
116
102
props .stylingPackage ? .options .selectedComponents .includes (' action-sheet' ) ||
117
103
props .stylingPackage ? .options .selectedComponents .includes (' activity-view' ) ||
118
104
props .stylingPackage ? .options .selectedComponents .includes (' bottom-sheet' )
@@ -281,99 +267,6 @@ const COMPONENTS: ComponentItem[] = [
281
267
}
282
268
},
283
269
< % } % >
284
- < % if (props .stylingPackage ? .options .selectedComponents .includes (' context-menu' )) { % >
285
- {
286
- name: ' Context Menu' ,
287
- component : function ContextMenuExample () {
288
- const [isChecked , setIsChecked ] = React .useState (true );
289
- return (
290
- < View>
291
- < ContextMenu .Root style= {{ borderRadius: 12 }}>
292
- < ContextMenu .Trigger >
293
- < View className= ' w-full h-36 rounded-xl border border-foreground border-dashed justify-center items-center' >
294
- < Text > Press and hold me< / Text >
295
- < / View>
296
- < / ContextMenu .Trigger >
297
- < ContextMenu .Content >
298
- < ContextMenu .Label children= ' Label 1' / >
299
- < ContextMenu .Item key= ' item-1' >
300
- < ContextMenu .ItemTitle > Item 1 < / ContextMenu .ItemTitle >
301
- < / ContextMenu .Item >
302
- < ContextMenu .Group >
303
- < ContextMenu .Item key= ' item-2' >
304
- < ContextMenu .ItemTitle > Item 2 < / ContextMenu .ItemTitle >
305
- < / ContextMenu .Item >
306
- < ContextMenu .CheckboxItem
307
- key= ' checkbox-example'
308
- value= {isChecked}
309
- onValueChange= {(val ) => {
310
- setIsChecked (val === ' on' );
311
- }}
312
- >
313
- < ContextMenu .ItemTitle > Item 3 < / ContextMenu .ItemTitle >
314
- < ContextMenu .ItemIndicator / >
315
- < / ContextMenu .CheckboxItem >
316
- < / ContextMenu .Group >
317
- < ContextMenu .Separator / >
318
- < / ContextMenu .Content >
319
- < / ContextMenu .Root >
320
- < / View>
321
- );
322
- },
323
- },
324
- < % } % >
325
- < % if (props .stylingPackage ? .options .selectedComponents .includes (' dropdown-menu' )) { % >
326
- {
327
- name: ' Dropdown Menu' ,
328
- component : function DropdownMenuExample () {
329
- const { colors } = useColorScheme ();
330
- const [menu , setMenu ] = React .useState < ' primary' | ' destructive' > (' primary' );
331
-
332
- return (
333
- < View className= ' items-center' >
334
- < DropdownMenu .Root >
335
- < DropdownMenu .Trigger >
336
- < Pressable className= ' flex-row items-center gap-1.5 android:gap-3' >
337
- < Text >
338
- Selected: < Text style= {{ color: colors[menu] }}> {menu}< / Text >
339
- < / Text >
340
- < View className= ' pl-0.5 opacity-70' >
341
- < Icon
342
- name= ' chevron-down'
343
- color= {colors .foreground }
344
- size= {21 }
345
- / >
346
- < / View>
347
- < / Pressable>
348
- < / DropdownMenu .Trigger >
349
- < DropdownMenu .Content >
350
- < DropdownMenu .CheckboxItem
351
- key= ' destructive'
352
- value= {menu === ' destructive' }
353
- onValueChange= {() => {
354
- setMenu (' destructive' );
355
- }}
356
- >
357
- < DropdownMenu .ItemIndicator / >
358
- < DropdownMenu .ItemTitle children= ' destructive' / >
359
- < / DropdownMenu .CheckboxItem >
360
- < DropdownMenu .CheckboxItem
361
- key= ' primary'
362
- value= {menu === ' primary' }
363
- onValueChange= {() => {
364
- setMenu (' primary' );
365
- }}
366
- >
367
- < DropdownMenu .ItemIndicator / >
368
- < DropdownMenu .ItemTitle children= ' primary' / >
369
- < / DropdownMenu .CheckboxItem >
370
- < / DropdownMenu .Content >
371
- < / DropdownMenu .Root >
372
- < / View>
373
- );
374
- },
375
- },
376
- < % } % >
377
270
< % if (props .stylingPackage ? .options .selectedComponents .includes (' progress-indicator' )) { % >
378
271
{
379
272
name: ' Progress Indicator' ,
@@ -410,62 +303,6 @@ const COMPONENTS: ComponentItem[] = [
410
303
},
411
304
},
412
305
< % } % >
413
- < % if (props .stylingPackage ? .options .selectedComponents .includes (' alert' )) { % >
414
- {
415
- name: ' Alert' ,
416
- component : function AlertExample () {
417
- const { colors } = useColorScheme ();
418
- return (
419
- < View className= ' items-center' >
420
- < DefaultButton
421
- color= {colors .destructive }
422
- onPress= {() => {
423
- if (Platform .OS === ' ios' ) {
424
- Alert .prompt (
425
- ' Delete account?' ,
426
- ' Enter your password to delete your account.' ,
427
- [
428
- {
429
- text: ' Cancel' ,
430
- onPress : () => console .log (' Cancel Pressed' ),
431
- style: ' cancel' ,
432
- },
433
- {
434
- text: ' Delete' ,
435
- style: ' destructive' ,
436
- onPress : () => console .log (' Delete Pressed' ),
437
- },
438
- ],
439
- ' secure-text' ,
440
- ' ' ,
441
- ' default'
442
- );
443
- } else {
444
- Alert .alert (
445
- ' Delete account?' ,
446
- ' Enter your password to delete your account.' ,
447
- [
448
- {
449
- text: ' Cancel' ,
450
- onPress : () => console .log (' Cancel Pressed' ),
451
- style: ' cancel' ,
452
- },
453
- {
454
- text: ' Delete' ,
455
- style: ' destructive' ,
456
- onPress : () => console .log (' Delete Pressed' ),
457
- },
458
- ]
459
- );
460
- }
461
- }}
462
- title= ' Delete account'
463
- / >
464
- < / View>
465
- );
466
- },
467
- },
468
- < % } % >
469
306
< % if (props .stylingPackage ? .options .selectedComponents .includes (' action-sheet' )) { % >
470
307
{
471
308
name: ' Action Sheet' ,
0 commit comments