PrePageBtn.js 997 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 PrePageBtn extends React.Component {
	constructor (props) {
	    super(props); 
	} 
	static propTypes = {  
    	path: PropTypes.string,
    	click:PropTypes.bool,
    	onClick:PropTypes.func,
		label:PropTypes.string    	
	}   
	render(){   
		const {path,label,click}=this.props;
		return( 
			<div className={cx(s.back_btn)}>
				{click&&  
					<a onClick={this.props.onClick}  href="javascript:;" className={cx(c['modal-back-btn'])}>
						<i className={cx(c.iconfont,'iconfont','kr_icon')}>&#xe613;</i>
						<span>上一页</span>
					</a>
				}

				{!click&& 
					<Link to={path} className={cx(c['modal-back-btn'])} > 
						<i className={cx(c.iconfont,'iconfont','kr_icon')}>&#xe613;</i>
						<span>上一页</span>
					</Link>
				}
			</div>
		)
	}
} 

export default PrePageBtn;