-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
refactor: Consolidate Markdown usage
...so that we will be able to define components in a single place.
- Loading branch information
1 parent
1bb7145
commit 3d01df7
Showing
3 changed files
with
31 additions
and
8 deletions.
There are no files selected for viewing
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
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,10 @@ | ||
import { ComponentProps } from "react"; | ||
import ReactMarkdown from "react-markdown"; | ||
|
||
const components: ComponentProps<typeof ReactMarkdown>["components"] = {}; | ||
|
||
export const Markdown = ( | ||
props: Omit<ComponentProps<typeof ReactMarkdown>, "components"> | ||
) => { | ||
return <ReactMarkdown components={components} {...props} />; | ||
}; |
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