UNPKG

@makeen.io/material-ui-kit

Version:
26 lines (14 loc) 2.68 kB
import _extends from "@babel/runtime/helpers/extends";import _objectWithoutProperties from "@babel/runtime/helpers/objectWithoutProperties";import _taggedTemplateLiteral from "@babel/runtime/helpers/taggedTemplateLiteral";function _templateObject2() {var data = _taggedTemplateLiteral(["\n ", ";\n"]);_templateObject2 = function _templateObject2() {return data;};return data;}function _templateObject() {var data = _taggedTemplateLiteral(["\n position: absolute;\n height: ", "px;\n max-width: ", "px;\n & .paper-full-width {\n width: ", "px;\n }\n & .container {\n overflow: hidden;\n }\n & .backdrop {\n position: absolute;\n background-color: transparent;\n }\n"]);_templateObject = function _templateObject() {return data;};return data;}import React from "react"; import { Dialog, DialogContent } from "@material-ui/core"; import styled from "styled-components"; var StyledDialog = styled(function (_ref) {var className = _ref.className,modalHeight = _ref.modalHeight,customStyle = _ref.customStyle,closeAction = _ref.closeAction,openState = _ref.openState,rest = _objectWithoutProperties(_ref, ["className", "modalHeight", "customStyle", "closeAction", "openState"]); return /*#__PURE__*/React.createElement(Dialog, _extends({ disablePortal: true, onClose: closeAction, open: openState, className: className, classes: { container: "container", paperFullWidth: "paper-full-width" }, BackdropProps: { classes: { root: "backdrop" } }, style: { position: "absolute" } }, rest)); })(_templateObject(), function (_ref2) {var modalHeight = _ref2.modalHeight;return modalHeight;}, function (_ref3) {var maxWidth = _ref3.maxWidth;return maxWidth;}, function (_ref4) {var fullWidth = _ref4.fullWidth,maxWidth = _ref4.maxWidth;return !fullWidth ? "auto" : maxWidth;}); var StyledDialogContent = styled(DialogContent)(_templateObject2(), function (_ref5) {var customStyle = _ref5.customStyle;return customStyle;}); export default (function (_ref6) {var onClose = _ref6.onClose,open = _ref6.open,_ref6$modalHeight = _ref6.modalHeight,modalHeight = _ref6$modalHeight === void 0 ? 500 : _ref6$modalHeight,_ref6$maxWidth = _ref6.maxWidth,maxWidth = _ref6$maxWidth === void 0 ? "lg" : _ref6$maxWidth,_ref6$fullWidth = _ref6.fullWidth,fullWidth = _ref6$fullWidth === void 0 ? true : _ref6$fullWidth,children = _ref6.children,customStyle = _ref6.customStyle;return /*#__PURE__*/React.createElement(StyledDialog, { closeAction: onClose, openState: open, modalHeight: modalHeight, maxWidth: maxWidth, fullWidth: fullWidth }, /*#__PURE__*/ React.createElement(StyledDialogContent, { customStyle: customStyle }, children));}); //# sourceMappingURL=index.js.map