import React, { Component } from 'react';
import {getImageUrl} from 'educoder';
import { Modal,Icon} from 'antd';
import axios from 'axios';
import './../questioncss/questioncom.css'
import './../../../common/components/comment/index.scss';

//立即申请试用
class QuestionModalPicture extends Component {

	constructor(props) {
		super(props);
		this.state={

		}
	}


	render() {

		return(
			<Modal
				keyboard={false}
				closable={true}
				footer={null}
				destroyOnClose={true}
				title=""
				centered={true}
				visible={this.props.url?true:false}
				onCancel={this.props.handleClose}
			>
				{/* 显示上传的图片信息 */}
				<style>
					{
						`
						.intermediatecenter{
							display: flex;
							flex-direction: column;
							align-items: center;
							justify-content: center;
							}
						`
					}
				</style>
				<div className="show_upload_image intermediatecenter" style={{ display: this.props.url ? 'block' : 'none'}}>
					{/*<Icon type="close" className="image_close" onClick={this.props.handleClose}/>*/}
					<div className="image_info intermediatecenter">
						<img className="image" style={{
							width:"100%"
						}} src={ this.props.url} alt=""/>
					</div>
				</div>
			</Modal>
		)
	}
}

export default QuestionModalPicture;
