-
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
1 parent
a66fda4
commit c309d61
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,13 +1,15 @@ | ||
import Headings from "./headings"; | ||
import Paragraph from "./paragraph"; | ||
import Toggle from "./toggle"; | ||
import Equation from "./equation"; | ||
|
||
export { Headings, Paragraph, Toggle }; | ||
export { Headings, Paragraph, Toggle, Equation }; | ||
|
||
export default { | ||
heading_1: Headings, | ||
heading_2: Headings, | ||
heading_3: Headings, | ||
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.