forked from mrzachnugent/react-native-reusables
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathindex.tsx
70 lines (69 loc) · 2.63 KB
/
index.tsx
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
import React from 'react';
import { ScrollView, View } from 'react-native';
import { Alert, AlertDescription, AlertTitle } from '~/components/ui/alert';
import {
AlertDialog,
AlertDialogAction,
AlertDialogCancel,
AlertDialogContent,
AlertDialogDescription,
AlertDialogFooter,
AlertDialogHeader,
AlertDialogTitle,
AlertDialogTrigger,
} from '~/components/ui/alert-dialog';
export default function AlertDialogScreen() {
return (
<ScrollView
contentContainerStyle={{
flex: 1,
justifyContent: 'space-between',
alignItems: 'center',
}}
>
<View style={{ height: 105 }} className='w-full opacity-0' />
<View className='flex-1 justify-center items-center p-8 gap-12'>
<AlertDialog className='w-full max-w-xl'>
<AlertDialogTrigger>Fade In</AlertDialogTrigger>
<AlertDialogContent className='w-full max-w-xl'>
<AlertDialogHeader>
<AlertDialogTitle>Are you absolutely sure?</AlertDialogTitle>
<AlertDialogDescription>
This action cannot be undone. This will permanently delete your
account and remove your data from our servers.
</AlertDialogDescription>
</AlertDialogHeader>
<AlertDialogFooter>
<AlertDialogCancel>Cancel</AlertDialogCancel>
<AlertDialogAction>Continue</AlertDialogAction>
</AlertDialogFooter>
</AlertDialogContent>
</AlertDialog>
<AlertDialog className='w-full max-w-xl'>
<AlertDialogTrigger variant='secondary'>Slide In</AlertDialogTrigger>
<AlertDialogContent animationType='slide' className='w-full max-w-xl'>
<AlertDialogHeader>
<AlertDialogTitle>Are you absolutely sure?</AlertDialogTitle>
<AlertDialogDescription>
This action cannot be undone. This will permanently delete your
account and remove your data from our servers.
</AlertDialogDescription>
</AlertDialogHeader>
<AlertDialogFooter className='flex-col'>
<AlertDialogAction className='w-full'>Continue</AlertDialogAction>
<AlertDialogCancel className='w-full'>Cancel</AlertDialogCancel>
</AlertDialogFooter>
</AlertDialogContent>
</AlertDialog>
</View>
<View className='p-4 w-full'>
<Alert icon='Code' className='max-w-xl'>
<AlertTitle>FYI</AlertTitle>
<AlertDescription>
This reusable does not use "rn-primitives"
</AlertDescription>
</Alert>
</View>
</ScrollView>
);
}