Created
December 27, 2020 17:12
-
-
Save ShanikaNishadhi/531b279e323836504774a7f8868685af to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import React from 'react'; | |
import {View, Text, StyleSheet, TouchableOpacity} from 'react-native'; | |
const App = () => { | |
return( | |
<View style={styles.container}> | |
<Text>Push Notifications</Text> | |
<TouchableOpacity activeOpacity={0.6}> | |
<View style={styles.button}> | |
<Text style={styles.buttonTitle}>Click me to get notification</Text> | |
</View> | |
</TouchableOpacity> | |
<TouchableOpacity activeOpacity={0.6}> | |
<View style={styles.button}> | |
<Text style={styles.buttonTitle}>Click me to get notification after 5sec.</Text> | |
</View> | |
</TouchableOpacity> | |
<TouchableOpacity activeOpacity={0.6}> | |
<View style={styles.button}> | |
<Text style={styles.buttonTitle}>Click me to cancel all notifications</Text> | |
</View> | |
</TouchableOpacity> | |
</View> | |
); | |
}; | |
export default App; | |
const styles = StyleSheet.create({ | |
container: { | |
flex: 1, | |
justifyContent: 'center', | |
alignItems: 'center', | |
}, | |
button: { | |
padding: 16, | |
backgroundColor: 'blue', | |
borderRadius: 24, | |
marginTop: 16, | |
}, | |
buttonTitle: { | |
color : 'white', | |
}, | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment