Advertisement
Guest User

Untitled

a guest
Oct 8th, 2018
92
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. import React, { Component } from 'react';
  2. import { Button } from 'react-native-elements';
  3. import {
  4.   View, StatusBar, Text, ScrollView, Image, Dimensions, StyleSheet
  5. } from 'react-native';
  6. import PropTypes from 'prop-types';
  7. import Modal from 'react-native-modalbox';
  8.  
  9. import { Container } from '../components/Container';
  10. import { LoginTextInput } from '../components/LoginTextInput';
  11. import { ButtonLogin } from '../components/ButtonLogin';
  12. import styles from './styles';
  13. import { ButtonWithBorder } from '../components/ButtonWithBorder';
  14. import { TextContent } from '../components/TextContent';
  15. import { TextTitle } from '../components/TextTitle';
  16. import { ButtonYellow } from '../components/ButtonYellow';
  17. import { TextInputBasic } from '../components/TextInputBasic';
  18.  
  19. const imageWidth = Dimensions.get('window').width;
  20. const imageHeight = Dimensions.get('window').height;
  21.  
  22. class LPEmailTerkirim extends Component {
  23.   static navigationOptions = {
  24.     //title: 'Welcome',
  25.     header: () => null,
  26.   };
  27.  
  28.   constructor(props) {
  29.     super(props);
  30.     this.modal1 = React.createRef();
  31.     this.state = {
  32.       isOpen: false,
  33.       isDisabled: false,
  34.       swipeToClose: true,
  35.     };
  36.   }
  37.  
  38. /*   state = {
  39.     modalVisible: false,
  40.   };
  41.  
  42.   setModalVisible(visible) {
  43.     this.setState({modalVisible: visible});
  44.   } */
  45.  
  46.   static propTypes = {
  47.     navigation: PropTypes.object,
  48.   };
  49.  
  50.   handleAktivasiPress = () => {
  51.     console.log('daftar pressed');
  52.     const { navigation } = this.props;
  53.     navigation.navigate('DaftarIndividu', { title: 'Daftar Sebagai Individu' });
  54.   };
  55.  
  56.  
  57.   render() {
  58.     const { goBack } = this.props.navigation;
  59.     return (
  60.       <Container >
  61.         <View style={styles.wrapper }>
  62.           <View >
  63.             <TextTitle content='Email Terkirim' />
  64.           </View>
  65.           <View>
  66.             <Image
  67.               style={{ width: imageWidth / 2, height: imageWidth / 2 }}
  68.               source={require('../components/Assets/registration/icon_sent.png')}
  69.               resizeMode='contain'
  70.             />
  71.           </View>
  72.           <View style={{ marginHorizontal: '8%' }}>
  73.             <TextContent
  74.              content="Sebuah tautan telah dikirimkan ke alamat email anda untuk melakukan reset password.
  75.             Silahkan klik tautan tersebut untuk melakukan pengubahan password." />
  76.            
  77.           </View>
  78.           <View>
  79.             <ButtonWithBorder text="Kembali" onPress={() =>  this.refs.UbahPW.open()} />
  80.           </View>
  81.  
  82.             <Modal style={[styles.modal, styles.emailTerkirim]} position={"center"} ref={"UbahPW"} isDisabled={this.state.isDisabled}>
  83.               <View style={{flex: 1, width: '80%', alignItems: 'center', justifyContent:'space-evenly'}}>
  84.                 <View><TextTitle content="Ubah Password"/></View>
  85.                 <View>
  86.                   <TextContent content="Masukkan kode yang anda dapatkan melalui email"/>
  87.                 </View>
  88.                 <View style={{}}>
  89.                   <TextInputBasic placeholder="Masukkan Kode"/>
  90.                 </View>
  91.                 <View style={{}}>
  92.                   <ButtonYellow onPress={()=> this.refs.UbahPW2.open()} text="Lanjutkan"/>
  93.                 </View>
  94.  
  95.               </View>
  96.             </Modal>
  97.  
  98.             <Modal style={[styles.modal, styles.emailTerkirim]} position={"center"} ref={"UbahPW2"} isDisabled={this.state.isDisabled}>
  99.               <View style={{flex: 1, width: '80%', alignItems: 'center', justifyContent:'space-evenly'}}>
  100.                 <View><TextTitle content="Ubah Password" /></View>
  101.                 <View>
  102.                   <TextContent content="Masukkan password baru yang ingin Anda gunakan untuk masuk ke akun Anda"/>
  103.                 </View>
  104.                 <View>
  105.                   <TextContent content="Min 8 karakter. Terdiri dari huruf ( berisi huruf kapital ), dan angka" />
  106.                   <LoginTextInput placeholder="Masukkan Password Baru"/>
  107.                   <LoginTextInput placeholder="Masukkan Kembali Password Baru"/>
  108.                
  109.                
  110.                   <ButtonYellow onPress={()=> this.refs.UbahSuccess.open()} text="Ubah Password"/>
  111.                 </View>
  112.  
  113.               </View>
  114.             </Modal>
  115.  
  116.             <Modal style={[styles.modal, styles.emailTerkirim]} position={"center"} ref={"UbahSuccess"} isDisabled={this.state.isDisabled}>
  117.               <View style={{flex: 1, width: '80%', alignItems: 'center', justifyContent:'space-evenly'}}>
  118.                 <View style={{}}>
  119.                   <Image
  120.                     style={{height:imageWidth / 3, width:imageWidth / 3 }}
  121.                     source={require('../components/Assets/registration/icon_change_password.png')}
  122.                     resizeMode="contain"
  123.                   />
  124.                 </View>
  125.                 <View style={{alignItems:'center'}}>
  126.                   <TextTitle content="Ubah Password Berhasil" />
  127.                 </View>
  128.                 <View>
  129.                   <TextContent content="Anda akan segera dialihkan ke halaman Login. Lalu Anda dapat login dengan password baru Anda." />
  130.                 </View>
  131.  
  132.               </View>
  133.             </Modal>
  134.         </View>
  135.       </Container>
  136.     );
  137.   }
  138. }
  139.  
  140. export default LPEmailTerkirim;
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement