Skip to content

Instantly share code, notes, and snippets.

@rafaelaugustos
Created January 14, 2020 13:50
Show Gist options
  • Save rafaelaugustos/617e8c5a8e67017802ab8d7d893db674 to your computer and use it in GitHub Desktop.
Save rafaelaugustos/617e8c5a8e67017802ab8d7d893db674 to your computer and use it in GitHub Desktop.
import React from 'react'
import { View, StyleSheet, Text, TouchableOpacity } from 'react-native'
import Modal from './Modal'
const App = () => {
return(
<View style={styles.container}>
<Text style={styles.title}>Animated Modal RN</Text>
<TouchableOpacity style={styles.button}>
<Text>Open Modal</Text>
</TouchableOpacity>
<Modal />
</View>
)
}
const styles = StyleSheet.create({
container: {
flex: 1,
backgroundColor: '#9b59b6',
alignItems: 'center',
justifyContent: 'center'
},
title: {
color: '#fff',
fontSize: 22
},
button: {
height: 50,
borderRadius: 10,
backgroundColor: '#fff',
justifyContent: 'center',
alignItems: 'center',
width: 300,
marginTop: 20
}
})
export default App
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment