quicksnack 3.31.0 → 3.31.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -36,12 +36,13 @@ var SlideInFromTop_1 = require("../../animation/SlideInFromTop/SlideInFromTop");
|
|
|
36
36
|
var Panel_1 = require("../Panel/Panel");
|
|
37
37
|
var Box_1 = require("../Box/Box");
|
|
38
38
|
var Overlay_1 = require("../Overlay/Overlay");
|
|
39
|
-
var Wrapper = styled_components_1.default.div(templateObject_1 || (templateObject_1 = __makeTemplateObject(["\n z-index: 50;\n"], ["\n z-index: 50;\n"])));
|
|
39
|
+
var Wrapper = styled_components_1.default.div(templateObject_1 || (templateObject_1 = __makeTemplateObject(["\n position: fixed;\n top: 0;\n left: 0;\n right: 0;\n bottom: 0;\n \n display: flex;\n align-items: center;\n justify-content: center;\n \n z-index: 50;\n"], ["\n position: fixed;\n top: 0;\n left: 0;\n right: 0;\n bottom: 0;\n \n display: flex;\n align-items: center;\n justify-content: center;\n \n z-index: 50;\n"])));
|
|
40
40
|
var StyledPanel = (0, styled_components_1.default)(Panel_1.Panel)(templateObject_2 || (templateObject_2 = __makeTemplateObject(["\n box-shadow: 0 8px 8px 0 rgba(34,36,38,.15);\n"], ["\n box-shadow: 0 8px 8px 0 rgba(34,36,38,.15);\n"])));
|
|
41
41
|
var Content = styled_components_1.default.div(templateObject_3 || (templateObject_3 = __makeTemplateObject(["\n line-height: ", ";\n font-size: 15px;\n"], ["\n line-height: ", ";\n font-size: 15px;\n"])), function (props) { return props.theme.spacing(6); });
|
|
42
42
|
var Modal = function (_a) {
|
|
43
43
|
var children = _a.children, handleClickOverlay = _a.handleClickOverlay, buttons = _a.buttons, panelProps = __rest(_a, ["children", "handleClickOverlay", "buttons"]);
|
|
44
|
-
return (react_1.default.createElement(
|
|
44
|
+
return (react_1.default.createElement(react_1.default.Fragment, null,
|
|
45
|
+
react_1.default.createElement(Overlay_1.Overlay, { onClick: handleClickOverlay }),
|
|
45
46
|
react_1.default.createElement(Wrapper, null,
|
|
46
47
|
react_1.default.createElement(SlideInFromTop_1.SlideInFromTop, null,
|
|
47
48
|
react_1.default.createElement(StyledPanel, __assign({ footer: buttons ? (react_1.default.createElement(Box_1.Box, { display: "flex", justifyContent: "flex-end" }, buttons)) : undefined }, panelProps), children && (react_1.default.createElement(Content, null, children)))))));
|
|
@@ -30,5 +30,5 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
30
30
|
exports.Overlay = void 0;
|
|
31
31
|
var styled_components_1 = __importStar(require("styled-components"));
|
|
32
32
|
var delay = (0, styled_components_1.keyframes)(templateObject_1 || (templateObject_1 = __makeTemplateObject(["\n 0% {\n opacity: 0;\n } \n 100% {\n opacity: 1;\n }\n"], ["\n 0% {\n opacity: 0;\n } \n 100% {\n opacity: 1;\n }\n"])));
|
|
33
|
-
exports.Overlay = styled_components_1.default.div(templateObject_2 || (templateObject_2 = __makeTemplateObject(["\n
|
|
33
|
+
exports.Overlay = styled_components_1.default.div(templateObject_2 || (templateObject_2 = __makeTemplateObject(["\n position: fixed; \n top: 0;\n left: 0; \n right: 0;\n bottom: 0;\n z-index: 10;\n opacity: 0;\n background-color: rgba(0,0,0,0.6);\n animation: ", " 0.2s forwards;\n"], ["\n position: fixed; \n top: 0;\n left: 0; \n right: 0;\n bottom: 0;\n z-index: 10;\n opacity: 0;\n background-color: rgba(0,0,0,0.6);\n animation: ", " 0.2s forwards;\n"])), delay);
|
|
34
34
|
var templateObject_1, templateObject_2;
|