mirror of
https://github.com/blitzkit/blitzkit.git
synced 2026-10-24 03:59:50 +02:00
fix: types
This commit is contained in:
1 parent
313691d3e9
commit
5feec9bf1e
1 file changed
+4
-2
@@ -1,6 +1,7 @@
|
|||||||
import type { ComponentProps } from "react";
|
import type { ComponentProps, FunctionComponent } from "react";
|
||||||
import Markdown from "react-markdown";
|
import Markdown from "react-markdown";
|
||||||
import { classNames } from "../../core/ui/classNames";
|
import { classNames } from "../../core/ui/classNames";
|
||||||
|
import { Code } from "../Code";
|
||||||
import { Text } from "../Text";
|
import { Text } from "../Text";
|
||||||
import styles from "./index.module.css";
|
import styles from "./index.module.css";
|
||||||
|
|
||||||
@@ -13,7 +14,8 @@ export function MarkdownCustom({ body, className, ...props }: MarkdownCustom) {
|
|||||||
<div className={classNames(className, styles.markdown)} {...props}>
|
<div className={classNames(className, styles.markdown)} {...props}>
|
||||||
<Markdown
|
<Markdown
|
||||||
components={{
|
components={{
|
||||||
p: Text,
|
p: Text as FunctionComponent<ComponentProps<"p">>,
|
||||||
|
code: Code,
|
||||||
}}
|
}}
|
||||||
>
|
>
|
||||||
{body}
|
{body}
|
||||||
|
|||||||
Reference in new issue
Block a user