Add a simple way to show more than one description in modal confirmation

This commit is contained in:
Tainan Felipe 2022-04-06 14:27:05 -03:00
parent 770da5b0c4
commit b62e9dc7d6
3 changed files with 10 additions and 2 deletions

View File

@ -71,7 +71,9 @@ class ConfirmationModal extends Component {
</Styled.Title>
</Styled.Header>
<Styled.Description>
<span dangerouslySetInnerHTML={{ __html: description }} />
<Styled.DescriptionText>
{description}
</Styled.DescriptionText>
{ hasCheckbox ? (
<label htmlFor="confirmationCheckbox" key="confirmation-checkbox">
<Styled.Checkbox

View File

@ -55,6 +55,10 @@ const Description = styled.div`
margin-bottom: ${jumboPaddingY};
`;
const DescriptionText = styled.span`
white-space: pre-line;
`;
const Checkbox = styled.input`
position: relative;
top: 0.134rem;
@ -85,6 +89,7 @@ export default {
Header,
Title,
Description,
DescriptionText,
Checkbox,
Footer,
ConfirmationButton,

View File

@ -46,7 +46,8 @@ class EndMeetingComponent extends PureComponent {
: intl.formatMessage(intlMessages.endMeetingNoUserDescription);
if (warnAboutUnsavedContentOnMeetingEnd) {
description += `<p>${intl.formatMessage(intlMessages.contentWarning)}</p>`;
// the double breakline it to put one empty line between the descriptions
description += `\n\n${intl.formatMessage(intlMessages.contentWarning)}`;
}
return (