UNPKG

react-app-shell

Version:

react打包脚本和example, 这里的版本请忽略

30 lines (26 loc) 721 B
import React, {PureComponent} from 'react'; import propTypes from 'prop-types'; import style from './index.less'; import share_img from '../../../../public/images/lottery/share.png'; /** * @description 分享引导提示 */ export default class ShareLayer extends PureComponent { static propTypes = { visible: propTypes.bool, onCancel: propTypes.func, } static defaultProps = { visible: true, onCancel: () => {}, } render() { const {visible, onCancel} = this.props; if (!visible) return null; return ( <div className={style.layer} onClick={onCancel}> <img src={share_img}/> </div> ); } }