beem-component 1.2.6 → 1.2.7
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.
|
@@ -58,19 +58,20 @@ var Overlay = _styledComponents.default.div(_templateObject || (_templateObject
|
|
|
58
58
|
|
|
59
59
|
exports.Overlay = Overlay;
|
|
60
60
|
|
|
61
|
-
var ModalContent = _styledComponents.default.div(_templateObject2 || (_templateObject2 = _taggedTemplateLiteral(["\n display: flex;\n flex-direction: column;\n border-radius: 0.25rem;\n padding: 1rem;\n
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
}
|
|
61
|
+
var ModalContent = _styledComponents.default.div(_templateObject2 || (_templateObject2 = _taggedTemplateLiteral(["\n display: flex;\n flex-direction: column;\n border-radius: 0.25rem;\n padding: 1rem;\n ", "\n background: ", ";\n ", "\n width: auto;\n max-width: 100%;\n\n > *:not(:last-child) {\n margin-bottom: 1rem;\n }\n @media (min-width: 576px) {\n max-width: 500px;\n width: 500px;\n }\n"])), ''
|
|
62
|
+
/* margin: auto; */
|
|
63
|
+
, _colors.BmPrimaryWhite, ''
|
|
64
|
+
/* width: ${({ size }) => {
|
|
65
|
+
if (size) {
|
|
66
|
+
if (size === "small") return "300px";
|
|
67
|
+
if (size === "default") return "500px";
|
|
68
|
+
if (size === "large") return "800px";
|
|
69
|
+
if (size === "xlarge") return "1140px";
|
|
70
|
+
return size;
|
|
71
|
+
}
|
|
72
|
+
return "500px";
|
|
73
|
+
}}; */
|
|
74
|
+
);
|
|
74
75
|
|
|
75
76
|
exports.ModalContent = ModalContent;
|
|
76
77
|
|
|
@@ -78,13 +79,13 @@ var ModalWrapper = _styledComponents.default.div(_templateObject3 || (_templateO
|
|
|
78
79
|
|
|
79
80
|
exports.ModalWrapper = ModalWrapper;
|
|
80
81
|
|
|
81
|
-
var BmModal = function BmModal(
|
|
82
|
-
var children =
|
|
83
|
-
show =
|
|
84
|
-
size =
|
|
85
|
-
onHide =
|
|
86
|
-
centered =
|
|
87
|
-
rest = _objectWithoutProperties(
|
|
82
|
+
var BmModal = function BmModal(_ref) {
|
|
83
|
+
var children = _ref.children,
|
|
84
|
+
show = _ref.show,
|
|
85
|
+
size = _ref.size,
|
|
86
|
+
onHide = _ref.onHide,
|
|
87
|
+
centered = _ref.centered,
|
|
88
|
+
rest = _objectWithoutProperties(_ref, _excluded);
|
|
88
89
|
|
|
89
90
|
var _useState = (0, _react.useState)(show),
|
|
90
91
|
_useState2 = _slicedToArray(_useState, 2),
|
|
@@ -126,13 +127,13 @@ exports.BmModal = BmModal;
|
|
|
126
127
|
|
|
127
128
|
var ModalHeader = _styledComponents.default.div(_templateObject4 || (_templateObject4 = _taggedTemplateLiteral(["\n display: flex;\n flex-direction: row;\n justify-content: space-between;\n"])));
|
|
128
129
|
|
|
129
|
-
BmModal.Header = function (
|
|
130
|
-
var children =
|
|
131
|
-
size =
|
|
132
|
-
onHide =
|
|
133
|
-
closeButton =
|
|
134
|
-
show =
|
|
135
|
-
rest = _objectWithoutProperties(
|
|
130
|
+
BmModal.Header = function (_ref2) {
|
|
131
|
+
var children = _ref2.children,
|
|
132
|
+
size = _ref2.size,
|
|
133
|
+
onHide = _ref2.onHide,
|
|
134
|
+
closeButton = _ref2.closeButton,
|
|
135
|
+
show = _ref2.show,
|
|
136
|
+
rest = _objectWithoutProperties(_ref2, _excluded2);
|
|
136
137
|
|
|
137
138
|
return /*#__PURE__*/_react.default.createElement(Consumer, null, function (value) {
|
|
138
139
|
return /*#__PURE__*/_react.default.createElement(_react.default.Fragment, null, /*#__PURE__*/_react.default.createElement(ModalHeader, rest, children, closeButton && /*#__PURE__*/_react.default.createElement(_iconStyles.BmIcons, _extends({
|
|
@@ -145,8 +146,8 @@ BmModal.Header = function (_ref3) {
|
|
|
145
146
|
});
|
|
146
147
|
};
|
|
147
148
|
|
|
148
|
-
BmModal.Body = _styledComponents.default.div(_templateObject5 || (_templateObject5 = _taggedTemplateLiteral(["\n display: flex;\n flex-direction: column;\n justify-content: space-between;\n > *:not(:last-child) {\n margin-bottom: 0.5rem;\n }\n max-height: ", ";\n overflow: auto;\n"])), function (
|
|
149
|
-
var size =
|
|
149
|
+
BmModal.Body = _styledComponents.default.div(_templateObject5 || (_templateObject5 = _taggedTemplateLiteral(["\n display: flex;\n flex-direction: column;\n justify-content: space-between;\n > *:not(:last-child) {\n margin-bottom: 0.5rem;\n }\n max-height: ", ";\n overflow: auto;\n"])), function (_ref3) {
|
|
150
|
+
var size = _ref3.size;
|
|
150
151
|
|
|
151
152
|
if (size) {
|
|
152
153
|
if (size === "small") return "21.429rem";
|
package/package.json
CHANGED
|
@@ -22,9 +22,9 @@ export const ModalContent = styled.div`
|
|
|
22
22
|
flex-direction: column;
|
|
23
23
|
border-radius: 0.25rem;
|
|
24
24
|
padding: 1rem;
|
|
25
|
-
margin: auto;
|
|
25
|
+
${'' /* margin: auto; */}
|
|
26
26
|
background: ${BmPrimaryWhite};
|
|
27
|
-
width: ${({ size }) => {
|
|
27
|
+
${'' /* width: ${({ size }) => {
|
|
28
28
|
if (size) {
|
|
29
29
|
if (size === "small") return "300px";
|
|
30
30
|
if (size === "default") return "500px";
|
|
@@ -33,7 +33,10 @@ export const ModalContent = styled.div`
|
|
|
33
33
|
return size;
|
|
34
34
|
}
|
|
35
35
|
return "500px";
|
|
36
|
-
}};
|
|
36
|
+
}}; */}
|
|
37
|
+
width: auto;
|
|
38
|
+
max-width: 100%;
|
|
39
|
+
|
|
37
40
|
> *:not(:last-child) {
|
|
38
41
|
margin-bottom: 1rem;
|
|
39
42
|
}
|