function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }

/*
 * @Author: codingfly
 * @Description:
 * @Date: 2021-08-11 10:31:55
 * @LastEditTime: 2021-09-06 09:02:44
 * @FilePath: \young\components\overlay\index.tsx
 */
import React from 'react';
import { View } from 'remax/one';
import { getPrefixCls } from './../common';
import classNames from 'classnames';
var prefixCls = getPrefixCls('overlay');

var Overlay = function Overlay(props) {
  var show = props.show,
      className = props.className,
      zIndex = props.zIndex,
      children = props.children,
      style = props.style,
      onTap = props.onTap;
  var overlayZindex = zIndex || zIndex === 0 ? zIndex : 999;
  return /*#__PURE__*/React.createElement(View, {
    className: classNames(prefixCls, className, _defineProperty({}, "".concat(prefixCls, "_active"), show)),
    style: Object.assign(Object.assign({}, style), {
      zIndex: overlayZindex
    }),
    onTap: onTap
  }, children);
};

export default Overlay;