Skip to content

armgit / memos

Public Imported from GitHub
0

Memos is an open-source, self-hosted note-taking app that brings your everyday thoughts together in a personal timeline. Your data stays yours, and you choose what to keep private or share.

fix: adjust compact mode styling for MemoContent component

Johnnyad327a4a8dca
diff --git a/web/src/components/MemoContent/index.tsx b/web/src/components/MemoContent/index.tsx
index b0f11e3c8..1aa802f38 100644
--- a/web/src/components/MemoContent/index.tsx
+++ b/web/src/components/MemoContent/index.tsx
@@ -40,9 +40,10 @@ const MemoContent = (props: MemoContentProps) => {
ref={memoContentContainerRef}
className={cn(
"relative w-full max-w-full wrap-break-word text-base leading-6",
- showCompactMode === "ALL" && `max-h-[${COMPACT_MODE_CONFIG.maxHeightVh}vh] overflow-hidden`,
+ showCompactMode === "ALL" && "overflow-hidden",
contentClassName,
)}
+ style={showCompactMode === "ALL" ? { maxHeight: `${COMPACT_MODE_CONFIG.maxHeightVh}vh` } : undefined}
onMouseUp={onClick}
onDoubleClick={onDoubleClick}
>