WithdrawModal.js 2.92 KB
'use strict';

import React from 'react';
import ReactNative from 'react-native';

const {
    AppRegistry,
    StyleSheet,
    Text,
    View,
    Dimensions,
    TouchableOpacity,
    Modal,
} = ReactNative;


export default class WithdrawModal extends React.Component {
    constructor(props) {
        super(props);
    }

    render() {
        return (
            <Modal
                visible={this.props.isShowWithdrawal}
                animationType={'none'}
                transparent={true}
                onRequestClose={() => {}}>
                <View style={styles.modalContainer}>
                    <View style={styles.modalView}>
                        <View style={styles.confirmTitleContainer}>
                            <Text style={styles.confirmTitle}>申请提现成功</Text>
                            <Text style={styles.confirmContent}>提现金额到帐时间为提现申请日期后3-5个工作日,节假日顺延。</Text>
                        </View>
                        <View style={{width: '100%', height: 0.5, backgroundColor: '#e0e0e0'}}/>
                        <View style={styles.confirmBtnContainer}>
                            <TouchableOpacity style={styles.click} onPress={() => {
                                this.props.hiddenWithDrawDialog && this.props.hiddenWithDrawDialog();
                            }}>
                                <Text style={styles.sure}>确定</Text>
                            </TouchableOpacity>
                        </View>
                    </View>
                </View>
            </Modal>
        );
    }
};

let {width, height} = Dimensions.get('window');

let styles = StyleSheet.create({
    modalContainer: {
        flex: 1,
        width: width,
        height: height,
        alignItems: 'center',
        justifyContent: 'center',
        backgroundColor: 'rgba(0, 0, 0, 0.4)',
    },
    modalView: {
        width: 270,
        borderRadius: 5,
        alignItems: 'center',
        backgroundColor: '#ffffff',
    },
    confirmBtnContainer: {
        width: '100%',
        height: 44.5,
        flexDirection: 'row',
    },
    confirmTitleContainer: {
        alignItems: 'center'
    },
    confirmTitle: {
        marginTop: 20,
        marginBottom: 8,
        color: 'black',
        fontSize: 17,
        textAlign: 'center',
        fontFamily: 'PingFang-SC-Regular',
        fontWeight: 'bold'
    },
    confirmContent: {
        marginLeft: 30,
        marginRight: 30,
        marginBottom: 20,
        color: '#444444',
        fontSize: 14,
        lineHeight: 24,
        textAlign: 'center',
        letterSpacing: -0.09,
        fontFamily: 'PingFang-SC-Regular',
        includeFontPadding: false,
    },
    click: {
        width: '100%',
        alignItems: 'center',
        justifyContent: 'center'
    },
    sure: {
        fontSize: 17,
        color: '#D0021B',
        letterSpacing: -0.41,
        fontWeight: 'bold'
    },
});