Skip to content

Commit 6372568

Browse files
committed
Work around LG-5601
1 parent 03101f2 commit 6372568

File tree

3 files changed

+4
-3
lines changed

3 files changed

+4
-3
lines changed

packages/compass-components/src/components/modals/confirmation-modal.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ function ConfirmationModal({
1414
>): React.ReactElement {
1515
return (
1616
<LeafyGreenConfirmationModal {...props}>
17-
<Body as="div">{children}</Body>
17+
{props.open && <Body as="div">{children}</Body>}
1818
</LeafyGreenConfirmationModal>
1919
);
2020
}

packages/compass-components/src/components/modals/marketing-modal.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ function MarketingModal({
1111
}: React.ComponentProps<typeof LeafyGreenMarketingModal>): React.ReactElement {
1212
return (
1313
<LeafyGreenMarketingModal {...props}>
14-
<Body as="div">{children}</Body>
14+
{props.open && <Body as="div">{children}</Body>}
1515
</LeafyGreenMarketingModal>
1616
);
1717
}

packages/compass-components/src/components/modals/modal.tsx

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,8 @@ function UnwrappedModal({
6868
)}
6969
{...props}
7070
>
71-
<Body as="div">{children}</Body>
71+
{/* Rendering conditionally on `open` as a workaround for LG-5601 */}
72+
{props.open && <Body as="div">{children}</Body>}
7273
</LeafyGreenModal>
7374
);
7475
}

0 commit comments

Comments
 (0)