beem-component 1.2.7 → 1.2.8
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,20 +58,7 @@ 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
|
-
/* 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
|
-
);
|
|
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 margin: auto;\n background: ", ";\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"])), _colors.BmPrimaryWhite);
|
|
75
62
|
|
|
76
63
|
exports.ModalContent = ModalContent;
|
|
77
64
|
|
package/package.json
CHANGED
|
@@ -22,18 +22,8 @@ export const ModalContent = styled.div`
|
|
|
22
22
|
flex-direction: column;
|
|
23
23
|
border-radius: 0.25rem;
|
|
24
24
|
padding: 1rem;
|
|
25
|
-
|
|
25
|
+
margin: auto;
|
|
26
26
|
background: ${BmPrimaryWhite};
|
|
27
|
-
${'' /* width: ${({ size }) => {
|
|
28
|
-
if (size) {
|
|
29
|
-
if (size === "small") return "300px";
|
|
30
|
-
if (size === "default") return "500px";
|
|
31
|
-
if (size === "large") return "800px";
|
|
32
|
-
if (size === "xlarge") return "1140px";
|
|
33
|
-
return size;
|
|
34
|
-
}
|
|
35
|
-
return "500px";
|
|
36
|
-
}}; */}
|
|
37
27
|
width: auto;
|
|
38
28
|
max-width: 100%;
|
|
39
29
|
|
|
@@ -7,19 +7,19 @@ export default {
|
|
|
7
7
|
component: BmModal,
|
|
8
8
|
title: "components/Modals",
|
|
9
9
|
argType: {
|
|
10
|
-
size: {
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
},
|
|
10
|
+
// size: {
|
|
11
|
+
// options: ["small", "default", "large", "xlarge"],
|
|
12
|
+
// control: { type: "select" },
|
|
13
|
+
// description: "Size of the Modal (Optional)",
|
|
14
|
+
// defaultValue: { summary: "default" },
|
|
15
|
+
// },
|
|
16
16
|
closeButton: {
|
|
17
17
|
description:
|
|
18
18
|
"Placed on BmModal.Header component. Displays the close button (X)",
|
|
19
19
|
},
|
|
20
|
-
centered: {
|
|
21
|
-
|
|
22
|
-
},
|
|
20
|
+
// centered: {
|
|
21
|
+
// description: "Centers the modal",
|
|
22
|
+
// },
|
|
23
23
|
show: {
|
|
24
24
|
control: { type: "boolean" },
|
|
25
25
|
description: "Handling the opening and closing of the modal",
|
|
@@ -37,7 +37,7 @@ export const SampleModal = () => {
|
|
|
37
37
|
<div>
|
|
38
38
|
<BmButton onClick={() => setShowModal(!showModal)}>Click Me!</BmButton>
|
|
39
39
|
</div>
|
|
40
|
-
<BmModal show={showModal} onHide={() => setShowModal(false)}
|
|
40
|
+
<BmModal show={showModal} onHide={() => setShowModal(false)}>
|
|
41
41
|
<BmModal.Header closeButton>
|
|
42
42
|
<h2>Header</h2>
|
|
43
43
|
</BmModal.Header>
|