ClosePageBtn.js 1003 Bytes
import React,{PropTypes} from 'react';    
import { Link } from 'react-router'; 
import cx from 'classnames';
import s from './ClosePageBtn.scss';
import c from '../employee/client/client.scss';

class ClosePageBtn extends React.Component {
	constructor (props) {
	    super(props); 
	} 
	static propTypes = {  
    	path: PropTypes.string,
    	click:PropTypes.bool,
		label:PropTypes.string,
		style:PropTypes.object    	
	}   
	render(){   
		const {path,label,click,style}=this.props;
		return( 
			<div className={cx(s.back_btn)} style={style}>
				{click&&
					<a onClick={this.props.onClick}  className={cx(c['modal-close-btn'])}>
						<i className={cx(c.iconfont,'iconfont','kr_icon')}>&#xe612;</i>
						<span>关闭页面</span>
					</a>
				}
				{!click&& 
					<Link to={path} className={cx(c['modal-close-btn'])} > 
						<i className={cx(c.iconfont,'iconfont','kr_icon')}>&#xe612;</i>
						<span>关闭页面</span>
					</Link>
				}
			</div>
		)
	}
} 

export default ClosePageBtn;