= ({ content }) => {
- return (
-
- {Markdoc.renderers.react(content, React, { components })}
-
- )
+ console.log('Markdoc content:', content)
+
+ return {Markdoc.renderers.react(content, React, { components })}
}
export default MarkdocRenderer
diff --git a/admin/inertia/components/markdoc/Heading.tsx b/admin/inertia/components/markdoc/Heading.tsx
new file mode 100644
index 0000000..c9cd1e7
--- /dev/null
+++ b/admin/inertia/components/markdoc/Heading.tsx
@@ -0,0 +1,28 @@
+import React, { JSX } from 'react'
+
+export function Heading({
+ level,
+ id,
+ children,
+}: {
+ level: number
+ id: string
+ children: React.ReactNode
+}) {
+ const Component = `h${level}` as keyof JSX.IntrinsicElements
+ const sizes = {
+ 1: 'text-3xl font-bold',
+ 2: 'text-2xl font-semibold',
+ 3: 'text-xl font-semibold',
+ 4: 'text-lg font-semibold',
+ 5: 'text-base font-semibold',
+ 6: 'text-sm font-semibold',
+ }
+
+ return (
+ // @ts-ignore
+
+ {children}
+
+ )
+}
diff --git a/admin/inertia/components/markdoc/List.tsx b/admin/inertia/components/markdoc/List.tsx
new file mode 100644
index 0000000..f60fc68
--- /dev/null
+++ b/admin/inertia/components/markdoc/List.tsx
@@ -0,0 +1,20 @@
+export function List({
+ ordered = false,
+ start,
+ children,
+}: {
+ ordered?: boolean
+ start?: number
+ children: React.ReactNode
+}) {
+ const className = ordered
+ ? 'list-decimal list-outside !ml-12 mb-4 space-y-1'
+ : 'list-disc list-outside !ml-12 mb-4 space-y-1'
+ const Tag = ordered ? 'ol' : 'ul'
+ return (
+ // @ts-ignore
+
+ {children}
+
+ )
+}
diff --git a/admin/inertia/components/markdoc/ListItem.tsx b/admin/inertia/components/markdoc/ListItem.tsx
new file mode 100644
index 0000000..2dcf57f
--- /dev/null
+++ b/admin/inertia/components/markdoc/ListItem.tsx
@@ -0,0 +1,4 @@
+
+export function ListItem({ children }: { children: React.ReactNode }) {
+ return {children}
+}
\ No newline at end of file
diff --git a/admin/inertia/tsconfig.json b/admin/inertia/tsconfig.json
index c04c853..9a332e6 100644
--- a/admin/inertia/tsconfig.json
+++ b/admin/inertia/tsconfig.json
@@ -8,5 +8,5 @@
"~/*": ["./*"],
},
},
- "include": ["./**/*.ts", "./**/*.tsx"],
+ "include": ["./**/*.ts", "./**/*.tsx", "components/markdoc/nodes/heading.markdoc.js"],
}
\ No newline at end of file