Skip to content

Commit 0a73ed7

Browse files
Added word break to prevent longer resposes to overflow the modal
1 parent 9873110 commit 0a73ed7

2 files changed

Lines changed: 9 additions & 3 deletions

File tree

cogboard-webapp/src/components/PopoverWithControls.js

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -56,17 +56,19 @@ export const PopoverWithControls = ({
5656
<StyledPopoverHeader>
5757
{SERVICE_CHECK_RESPONSES.expected}
5858
</StyledPopoverHeader>
59-
{expectedResponseBody}
59+
<p>{expectedResponseBody}</p>
6060
</StyledPopoverText>
6161
<StyledPopoverText>
6262
<StyledPopoverHeader>
6363
{SERVICE_CHECK_RESPONSES.received}
6464
</StyledPopoverHeader>
65-
{body}
65+
<p>{body}</p>
6666
</StyledPopoverText>
6767
</StyledPopoverTextWrapper>
6868
) : (
69-
<StyledPopoverText>{body}</StyledPopoverText>
69+
<StyledPopoverText>
70+
<p>{body}</p>
71+
</StyledPopoverText>
7072
)}
7173
</Popover>
7274
</>

cogboard-webapp/src/components/styled/index.js

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -132,6 +132,10 @@ export const StyledPopoverText = styled.div`
132132
background: ${COLORS.WHITE};
133133
color: ${COLORS.BLACK};
134134
padding: 1rem;
135+
136+
p {
137+
word-break: break-word;
138+
}
135139
`;
136140

137141
export const StyledPopoverHeader = styled(Typography)`

0 commit comments

Comments
 (0)