-
Notifications
You must be signed in to change notification settings - Fork 19
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
7 changed files
with
381 additions
and
4 deletions.
There are no files selected for viewing
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
17 changes: 17 additions & 0 deletions
17
packages/react-notion-custom/src/lib/components/equation.tsx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
/** | ||
* @link react-katex https://github.com/MatejBransky/react-katex?tab=readme-ov-file | ||
*/ | ||
import "katex/dist/katex.min.css"; | ||
import TeX from "@matejmazur/react-katex"; | ||
|
||
import { EquationArgs } from "../types"; | ||
|
||
const Equation = ({ equation: { expression } }: EquationArgs) => { | ||
return ( | ||
<TeX className="notion-block notion-equation notion-equation-block"> | ||
{expression} | ||
</TeX> | ||
); | ||
}; | ||
|
||
export default Equation; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,15 +1,17 @@ | ||
import Equation from "./equation"; | ||
import Heading1 from "./heading-1"; | ||
import Heading2 from "./heading-2"; | ||
import Heading3 from "./heading-3"; | ||
import Paragraph from "./paragraph"; | ||
import Toggle from "./toggle"; | ||
|
||
export { Heading1, Heading2, Heading3, Paragraph }; | ||
export { Heading1, Heading2, Heading3, Paragraph, Equation }; | ||
|
||
export default { | ||
heading_1: Heading1, | ||
heading_2: Heading2, | ||
heading_3: Heading3, | ||
paragraph: Paragraph, | ||
toggle: Toggle, | ||
equation: Equation, | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.