Skip to content

Commit 1677b8b

Browse files
authored
Merge pull request #418 from bluewave-labs/popup-preview-fix
Fixed popup container
2 parents 112118e + 480633b commit 1677b8b

File tree

3 files changed

+22
-5
lines changed

3 files changed

+22
-5
lines changed

frontend/src/components/RichTextEditor/RichTextEditor.css

+3-1
Original file line numberDiff line numberDiff line change
@@ -3,9 +3,11 @@
33
color: var(--main-text-color);
44
font-size: var(--font-regular);
55
border-radius: 8px;
6-
padding-top: 1rem;
6+
padding-top: 0.5rem;
77
margin-top: 1rem;
88
width: 400px;
9+
padding-left: 0.5rem;
10+
box-sizing: border-box;
911
}
1012

1113
.ProseMirror {

frontend/src/products/Popup/PopupComponent.jsx

+5-2
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,9 @@ const PopupComponent = ({
2323
const sizeClass = validSizes.includes(popupSize.toLowerCase())
2424
? styles[popupSize.toLowerCase()]
2525
: "";
26+
const sizeClassContent = validSizes.includes(popupSize.toLowerCase())
27+
? styles[popupSize.toLowerCase() + 'Content']
28+
: "";
2629
const centeredClass = isReal ? styles.centered : "";
2730

2831
const handleClose = () => {
@@ -63,7 +66,7 @@ const PopupComponent = ({
6366
/>
6467
</div>
6568
)}
66-
<div className={`${styles.popupContentContainer}`}>
69+
<div className={`${styles.popupContentContainer} ${sizeClassContent}`}>
6770
<div className={styles.popupContent} style={{ color: textColor }}>
6871
<ReactMarkdown>{content}</ReactMarkdown>
6972
</div>
@@ -73,7 +76,7 @@ const PopupComponent = ({
7376
style={{
7477
backgroundColor: buttonBackgroundColor,
7578
color: buttonTextColor,
76-
marginRight: "1rem",
79+
borderRadius: '8px'
7780
}}
7881
text={previewBtnText}
7982
onClick={handleButtonClick} // Add onClick handler

frontend/src/products/Popup/PopupComponent.module.css

+14-2
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,6 @@
88
}
99

1010
.popupContent {
11-
padding: 20px 25px;
1211
color: var(--second-text-color);
1312
font-size: var(--font-regular);
1413
}
@@ -38,7 +37,8 @@
3837
display: flex;
3938
flex-direction: column;
4039
box-sizing: border-box;
41-
height: calc(100% - 30px);
40+
min-height: 177px;
41+
padding: 18px 25px 25px 25px;
4242
}
4343

4444
.popupButtonContainer {
@@ -72,3 +72,15 @@
7272
min-width: 700px;
7373
min-height: 350px;
7474
}
75+
76+
.smallContent {
77+
min-height: 177px;
78+
}
79+
80+
.mediumContent {
81+
min-height: 227px;
82+
}
83+
84+
.largeContent {
85+
min-height: 277px;
86+
}

0 commit comments

Comments
 (0)