Skip to content

Instantly share code, notes, and snippets.

@ShanikaNishadhi
Created December 27, 2020 17:12
Show Gist options
  • Save ShanikaNishadhi/531b279e323836504774a7f8868685af to your computer and use it in GitHub Desktop.
Save ShanikaNishadhi/531b279e323836504774a7f8868685af to your computer and use it in GitHub Desktop.
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