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.

chore: fix math styles

johnnyjoy2ebf3f261517
diff --git a/web/src/components/MemoContent/Math.tsx b/web/src/components/MemoContent/Math.tsx
index dd3a1452a..b75a39cfe 100644
--- a/web/src/components/MemoContent/Math.tsx
+++ b/web/src/components/MemoContent/Math.tsx
@@ -1,4 +1,5 @@
import TeX from "@matejmazur/react-katex";
+import clsx from "clsx";
import "katex/dist/katex.min.css";
interface Props {
@@ -7,7 +8,7 @@ interface Props {
}
const Math: React.FC<Props> = ({ content, block }: Props) => {
- return <TeX className="max-w-full inline-block overflow-auto" block={block} math={content}></TeX>;
+ return <TeX className={clsx("max-w-full", block ? "w-full block" : "inline text-sm")} block={block} math={content}></TeX>;
};
export default Math;