Application Android et IOS pour l'amicale des élèves
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

IconIntro.js 906B

1234567891011121314151617181920212223242526272829303132333435363738394041
  1. // @flow
  2. import * as React from 'react';
  3. import {StyleSheet, View} from 'react-native';
  4. import * as Animatable from 'react-native-animatable';
  5. import MaterialCommunityIcons from 'react-native-vector-icons/MaterialCommunityIcons';
  6. type PropsType = {
  7. icon: string,
  8. };
  9. const styles = StyleSheet.create({
  10. center: {
  11. marginTop: 'auto',
  12. marginBottom: 'auto',
  13. marginRight: 'auto',
  14. marginLeft: 'auto',
  15. },
  16. });
  17. class IntroIcon extends React.Component<PropsType> {
  18. shouldComponentUpdate(): boolean {
  19. return false;
  20. }
  21. render(): React.Node {
  22. const {icon} = this.props;
  23. return (
  24. <View style={{flex: 1}}>
  25. <Animatable.View
  26. useNativeDriver
  27. style={styles.center}
  28. animation="fadeIn">
  29. <MaterialCommunityIcons name={icon} color="#fff" size={200} />
  30. </Animatable.View>
  31. </View>
  32. );
  33. }
  34. }
  35. export default IntroIcon;