Skip to content

Commit

Permalink
Added word break to prevent longer resposes to overflow the modal
Browse files Browse the repository at this point in the history
  • Loading branch information
michal-gasiorek-wttech committed Sep 14, 2021
1 parent 9873110 commit 0a73ed7
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 3 deletions.
8 changes: 5 additions & 3 deletions cogboard-webapp/src/components/PopoverWithControls.js
Original file line number Diff line number Diff line change
Expand Up @@ -56,17 +56,19 @@ export const PopoverWithControls = ({
<StyledPopoverHeader>
{SERVICE_CHECK_RESPONSES.expected}
</StyledPopoverHeader>
{expectedResponseBody}
<p>{expectedResponseBody}</p>
</StyledPopoverText>
<StyledPopoverText>
<StyledPopoverHeader>
{SERVICE_CHECK_RESPONSES.received}
</StyledPopoverHeader>
{body}
<p>{body}</p>
</StyledPopoverText>
</StyledPopoverTextWrapper>
) : (
<StyledPopoverText>{body}</StyledPopoverText>
<StyledPopoverText>
<p>{body}</p>
</StyledPopoverText>
)}
</Popover>
</>
Expand Down
4 changes: 4 additions & 0 deletions cogboard-webapp/src/components/styled/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -132,6 +132,10 @@ export const StyledPopoverText = styled.div`
background: ${COLORS.WHITE};
color: ${COLORS.BLACK};
padding: 1rem;
p {
word-break: break-word;
}
`;

export const StyledPopoverHeader = styled(Typography)`
Expand Down

0 comments on commit 0a73ed7

Please sign in to comment.