mirror of
https://github.com/blitzkit/blitzkit.git
synced 2026-11-14 21:26:08 +01:00
feat: cleaner api rendering
This commit is contained in:
1 parent
8b01b7c192
commit
0e57943d33
5 files changed
+28
-9
No files matched your search
@@ -1,14 +1,16 @@
|
||||
import type { ComponentProps } from "react";
|
||||
import Markdown from "react-markdown";
|
||||
import { classNames } from "../../core/ui/classNames";
|
||||
import { Text } from "../Text";
|
||||
import styles from "./index.module.css";
|
||||
|
||||
interface Props {
|
||||
interface MarkdownCustom extends ComponentProps<"div"> {
|
||||
body: string;
|
||||
}
|
||||
|
||||
export function MarkdownCustom({ body }: Props) {
|
||||
export function MarkdownCustom({ body, className, ...props }: MarkdownCustom) {
|
||||
return (
|
||||
<div className={styles.markdown}>
|
||||
<div className={classNames(className, styles.markdown)} {...props}>
|
||||
<Markdown
|
||||
components={{
|
||||
p: Text,
|
||||
|
||||
Reference in new issue
Block a user