From 858d869e5327f549cf8ea24d91ccebec63d1d49c Mon Sep 17 00:00:00 2001 From: Alvaro Nicoli Date: Thu, 15 Dec 2022 11:13:40 -0300 Subject: [PATCH] chore: create example project --- example/.gitignore | 14 + example/App.js | 94 + example/app.json | 33 + example/assets/adaptive-icon.png | Bin 0 -> 17547 bytes example/assets/favicon.png | Bin 0 -> 1466 bytes example/assets/icon.png | Bin 0 -> 22380 bytes example/assets/splash.png | Bin 0 -> 47346 bytes example/babel.config.js | 6 + example/package.json | 22 + example/yarn.lock | 6581 ++++++++++++++++++++++++++++++ 10 files changed, 6750 insertions(+) create mode 100644 example/.gitignore create mode 100644 example/App.js create mode 100644 example/app.json create mode 100644 example/assets/adaptive-icon.png create mode 100644 example/assets/favicon.png create mode 100644 example/assets/icon.png create mode 100644 example/assets/splash.png create mode 100644 example/babel.config.js create mode 100644 example/package.json create mode 100644 example/yarn.lock diff --git a/example/.gitignore b/example/.gitignore new file mode 100644 index 0000000..ec8a36a --- /dev/null +++ b/example/.gitignore @@ -0,0 +1,14 @@ +node_modules/ +.expo/ +dist/ +npm-debug.* +*.jks +*.p8 +*.p12 +*.key +*.mobileprovision +*.orig.* +web-build/ + +# macOS +.DS_Store diff --git a/example/App.js b/example/App.js new file mode 100644 index 0000000..e61102b --- /dev/null +++ b/example/App.js @@ -0,0 +1,94 @@ +import React, { useCallback, useState } from 'react'; +import { Platform, StyleSheet, Button, Text, View, TouchableOpacity } from 'react-native'; +import { FancyAlert } from 'react-native-expo-fancy-alerts'; +import Ionicons from '@expo/vector-icons/Ionicons'; + +export default function App() { + const [alertVisible, setAlertVisible] = useState(false); + + const handlePress = useCallback(() => { + setAlertVisible(true); + }, []); + + const handleClose = useCallback(() => { + setAlertVisible(false); + }, []); + + return ( + + + + + } + onRequestClose={handleClose} + visible={alertVisible} + > + + Failed Successfully + + Okay :( + + + + +