You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
InternshipProject/node_modules/rc-trigger/es/Popup/Mask.js

45 lines
1.2 KiB

import _extends from "@babel/runtime/helpers/esm/extends";
import _objectSpread from "@babel/runtime/helpers/esm/objectSpread2";
import * as React from 'react';
import classNames from 'classnames';
import CSSMotion from 'rc-motion';
import { getMotion } from '../utils/legacyUtil';
export default function Mask(props) {
var prefixCls = props.prefixCls,
visible = props.visible,
zIndex = props.zIndex,
mask = props.mask,
maskMotion = props.maskMotion,
maskAnimation = props.maskAnimation,
maskTransitionName = props.maskTransitionName;
if (!mask) {
return null;
}
var motion = {};
if (maskMotion || maskTransitionName || maskAnimation) {
motion = _objectSpread({
motionAppear: true
}, getMotion({
motion: maskMotion,
prefixCls: prefixCls,
transitionName: maskTransitionName,
animation: maskAnimation
}));
}
return /*#__PURE__*/React.createElement(CSSMotion, _extends({}, motion, {
visible: visible,
removeOnLeave: true
}), function (_ref) {
var className = _ref.className;
return /*#__PURE__*/React.createElement("div", {
style: {
zIndex: zIndex
},
className: classNames("".concat(prefixCls, "-mask"), className)
});
});
}