init commit
This commit is contained in:
14
web/src/components/MemoContent/Math.tsx
Normal file
14
web/src/components/MemoContent/Math.tsx
Normal file
@@ -0,0 +1,14 @@
|
||||
import TeX from "@matejmazur/react-katex";
|
||||
import { cn } from "@/lib/utils";
|
||||
import "katex/dist/katex.min.css";
|
||||
|
||||
interface Props {
|
||||
content: string;
|
||||
block?: boolean;
|
||||
}
|
||||
|
||||
const Math: React.FC<Props> = ({ content, block }: Props) => {
|
||||
return <TeX className={cn("max-w-full", block ? "w-full block" : "inline text-sm")} block={block} math={content}></TeX>;
|
||||
};
|
||||
|
||||
export default Math;
|
||||
Reference in New Issue
Block a user