Advertisement
zidniryi

Untitled

Jan 18th, 2020
215
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.82 KB | None | 0 0
  1. import RewardsComponent from 'react-native-rewards';
  2. import React, { Component, createRef } from 'react';
  3. import {TouchableOpacity, Text, StyleSheet} from 'react-native'
  4.  
  5. export default class App extends Component {
  6. state={
  7. animationState: 'rest',
  8. }
  9.  
  10. render() {
  11. const { animationState } = this.state;
  12. return (
  13. <RewardsComponent
  14. animationType="confetti"
  15. state={animationState}
  16. onRest={() => this.setState({ animationState: 'rest' })}
  17. >
  18. <TouchableOpacity
  19. onPress={() => this.setState({ animationState: 'reward' })}
  20. style={styles.buttonProps}
  21. >
  22. <Text style={{marginTop:200}}>My Name Is Zidni</Text>
  23. </TouchableOpacity>
  24. </RewardsComponent>
  25. )
  26. }
  27. }
  28.  
  29. const styles = StyleSheet.create({
  30.  
  31. })
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement