mirror of https://github.com/usememos/memos
You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
15 lines
376 B
TypeScript
15 lines
376 B
TypeScript
import TeX from "@matejmazur/react-katex";
|
|
import clsx from "clsx";
|
|
import "katex/dist/katex.min.css";
|
|
|
|
interface Props {
|
|
content: string;
|
|
block?: boolean;
|
|
}
|
|
|
|
const Math: React.FC<Props> = ({ content, block }: Props) => {
|
|
return <TeX className={clsx("max-w-full", block ? "w-full block" : "inline text-sm")} block={block} math={content}></TeX>;
|
|
};
|
|
|
|
export default Math;
|