UNPKG

@td-design/react-native

Version:

react-native UI组件库

26 lines 1.07 kB
function _extends() { _extends = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); } import React from 'react'; import Portal from '../../portal'; import ModalView from './ModalView'; export default function Modal(props) { const { animationType = 'slide', animationDuration = 300, visible = false, maskClosable = true, maskVisible = true, position = 'bottom', children, ...rest } = props; return /*#__PURE__*/React.createElement(Portal, null, /*#__PURE__*/React.createElement(ModalView, _extends({}, rest, { visible: visible, animationType: animationType, animationDuration: animationDuration, maskClosable: maskClosable, maskVisible: maskVisible, position: position }), children)); } Modal.displayName = 'Modal'; //# sourceMappingURL=index.js.map