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.

MascotIntroWelcome.js 2.5KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495
  1. /*
  2. * Copyright (c) 2019 - 2020 Arnaud Vergnet.
  3. *
  4. * This file is part of Campus INSAT.
  5. *
  6. * Campus INSAT is free software: you can redistribute it and/or modify
  7. * it under the terms of the GNU General Public License as published by
  8. * the Free Software Foundation, either version 3 of the License, or
  9. * (at your option) any later version.
  10. *
  11. * Campus INSAT is distributed in the hope that it will be useful,
  12. * but WITHOUT ANY WARRANTY; without even the implied warranty of
  13. * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  14. * GNU General Public License for more details.
  15. *
  16. * You should have received a copy of the GNU General Public License
  17. * along with Campus INSAT. If not, see <https://www.gnu.org/licenses/>.
  18. */
  19. // @flow
  20. import * as React from 'react';
  21. import {StyleSheet, View} from 'react-native';
  22. import * as Animatable from 'react-native-animatable';
  23. import MaterialCommunityIcons from 'react-native-vector-icons/MaterialCommunityIcons';
  24. import Mascot, {MASCOT_STYLE} from '../Mascot/Mascot';
  25. const styles = StyleSheet.create({
  26. center: {
  27. marginTop: 'auto',
  28. marginBottom: 'auto',
  29. marginRight: 'auto',
  30. marginLeft: 'auto',
  31. },
  32. });
  33. class MascotIntroWelcome extends React.Component<null> {
  34. shouldComponentUpdate(): boolean {
  35. return false;
  36. }
  37. render(): React.Node {
  38. return (
  39. <View style={{flex: 1}}>
  40. <Mascot
  41. style={{
  42. ...styles.center,
  43. width: '80%',
  44. }}
  45. emotion={MASCOT_STYLE.NORMAL}
  46. animated
  47. entryAnimation={{
  48. animation: 'bounceIn',
  49. duration: 2000,
  50. }}
  51. />
  52. <Animatable.Text
  53. useNativeDriver
  54. animation="fadeInUp"
  55. duration={500}
  56. style={{
  57. color: '#fff',
  58. textAlign: 'center',
  59. fontSize: 25,
  60. }}>
  61. PABLO
  62. </Animatable.Text>
  63. <Animatable.View
  64. useNativeDriver
  65. animation="fadeInUp"
  66. duration={500}
  67. delay={200}
  68. style={{
  69. position: 'absolute',
  70. bottom: 30,
  71. right: '20%',
  72. width: 50,
  73. height: 50,
  74. }}>
  75. <MaterialCommunityIcons
  76. style={{
  77. ...styles.center,
  78. transform: [{rotateZ: '70deg'}],
  79. }}
  80. name="undo"
  81. color="#fff"
  82. size={40}
  83. />
  84. </Animatable.View>
  85. </View>
  86. );
  87. }
  88. }
  89. export default MascotIntroWelcome;