Allow line breaks

This commit is contained in:
aet 2021-12-28 03:12:36 -05:00
parent 82327da031
commit 5883adc2c1
2 changed files with 6 additions and 2 deletions

View File

@ -7,7 +7,8 @@
"scripts": {
"design": "marked -o design.html < design.md",
"test": "node --expose-gc node_modules/mocha/bin/_mocha test/**/*.test.ts",
"repl": "node -r ts-node/register/transpile-only src/repl.ts"
"repl": "node -r ts-node/register/transpile-only src/repl.ts",
"bundle": "cd packages/web && yarn bundle"
},
"devDependencies": {
"@types/chai": "^4.3.0",

View File

@ -59,6 +59,9 @@ const AttachmentContainer = styled.div`
display: flex;
margin: 5px 0;
`
const PlainNotes = styled.p`
white-space: pre-wrap;
`
const SectionsView = memo<{ sections?: ItemDetails["sections"] }>(({ sections }) =>
sections?.length ? (
@ -135,7 +138,7 @@ export const ItemView = memo<ItemViewProps>(({ className, item }) => {
<ExtraField>
<FieldTitle>notes</FieldTitle>
<div>
<p>{item.details.notesPlain}</p>
<PlainNotes>{item.details.notesPlain}</PlainNotes>
</div>
</ExtraField>
)}