Skip to content

Commit

Permalink
fix(aboutAOUnit): newlines missing in AO description (#1656)
Browse files Browse the repository at this point in the history
Backport of: #1655
Fixes: https://dhis2.atlassian.net/browse/DHIS2-15914

Set white-space to pre-line to preserve newlines
  • Loading branch information
jenniferarnesen authored Apr 19, 2024
1 parent 02ed7a0 commit 8fe3a14
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 0 deletions.
1 change: 1 addition & 0 deletions src/components/AboutAOUnit/AboutAOUnit.js
Original file line number Diff line number Diff line change
Expand Up @@ -193,6 +193,7 @@ const AboutAOUnit = forwardRef(({ type, id, renderId }, ref) => {
<div className="content">
<p
className={cx('detailLine', {
description: true,
noDescription: !data.ao.displayDescription,
})}
>
Expand Down
4 changes: 4 additions & 0 deletions src/components/AboutAOUnit/styles/AboutAOUnit.style.js
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,10 @@ export default css`
flex-shrink: 0;
}
.description {
white-space: pre-line;
}
.noDescription {
color: ${colors.grey600};
}
Expand Down

0 comments on commit 8fe3a14

Please sign in to comment.