chore: remove param includeFumadocsComponents in CustomMDXContent
This commit is contained in:
parent
d9dee949ef
commit
fbd764c76f
@ -166,10 +166,7 @@ export default async function BlogPostPage(props: NextPageProps) {
|
||||
{/* in order to make the mdx.css work, we need to add the className prose to the div */}
|
||||
{/* https://github.com/tailwindlabs/tailwindcss-typography */}
|
||||
<div className="mt-8 max-w-none prose prose-neutral dark:prose-invert prose-img:rounded-lg">
|
||||
<CustomMDXContent
|
||||
code={post.body}
|
||||
includeFumadocsComponents={true}
|
||||
/>
|
||||
<CustomMDXContent code={post.body} />
|
||||
</div>
|
||||
|
||||
<div className="flex items-center justify-start my-16">
|
||||
|
@ -136,7 +136,6 @@ export default async function DocPage({ params }: DocPageProps) {
|
||||
);
|
||||
},
|
||||
}}
|
||||
includeFumadocsComponents={true}
|
||||
/>
|
||||
</DocsBody>
|
||||
</DocsPage>
|
||||
|
@ -38,10 +38,7 @@ export function CustomPage({
|
||||
<Card className="mb-8">
|
||||
<CardContent>
|
||||
<div className="max-w-none prose prose-neutral dark:prose-invert prose-img:rounded-lg">
|
||||
<CustomMDXContent
|
||||
code={content}
|
||||
includeFumadocsComponents={false}
|
||||
/>
|
||||
<CustomMDXContent code={content} />
|
||||
</div>
|
||||
</CardContent>
|
||||
</Card>
|
||||
|
@ -41,7 +41,7 @@ export function ReleaseCard({
|
||||
</CardHeader>
|
||||
<CardContent>
|
||||
<div className="max-w-none prose prose-neutral dark:prose-invert prose-img:rounded-lg">
|
||||
<CustomMDXContent code={content} includeFumadocsComponents={false} />
|
||||
<CustomMDXContent code={content} />
|
||||
</div>
|
||||
</CardContent>
|
||||
</Card>
|
||||
|
@ -16,7 +16,6 @@ import type { ComponentProps, FC } from 'react';
|
||||
interface CustomMDXContentProps {
|
||||
code: string;
|
||||
customComponents?: Record<string, any>;
|
||||
includeFumadocsComponents?: boolean;
|
||||
}
|
||||
|
||||
/**
|
||||
@ -26,7 +25,6 @@ interface CustomMDXContentProps {
|
||||
export async function CustomMDXContent({
|
||||
code,
|
||||
customComponents = {},
|
||||
includeFumadocsComponents = true,
|
||||
}: CustomMDXContentProps) {
|
||||
// Start with default components
|
||||
const baseComponents: Record<string, any> = {
|
||||
@ -34,28 +32,22 @@ export async function CustomMDXContent({
|
||||
...LucideIcons,
|
||||
...((await import('lucide-react')) as unknown as MDXComponents),
|
||||
YoutubeVideo,
|
||||
Tabs,
|
||||
Tab,
|
||||
TypeTable,
|
||||
Accordion,
|
||||
Accordions,
|
||||
Steps,
|
||||
Step,
|
||||
Wrapper,
|
||||
File,
|
||||
Folder,
|
||||
Files,
|
||||
blockquote: Callout as unknown as FC<ComponentProps<'blockquote'>>,
|
||||
img: ImageWrapper,
|
||||
...customComponents,
|
||||
};
|
||||
|
||||
// Add Fumadocs UI components if requested
|
||||
if (includeFumadocsComponents) {
|
||||
Object.assign(baseComponents, {
|
||||
Tabs,
|
||||
Tab,
|
||||
TypeTable,
|
||||
Accordion,
|
||||
Accordions,
|
||||
Steps,
|
||||
Step,
|
||||
Wrapper,
|
||||
File,
|
||||
Folder,
|
||||
Files,
|
||||
blockquote: Callout as unknown as FC<ComponentProps<'blockquote'>>,
|
||||
img: ImageWrapper,
|
||||
});
|
||||
}
|
||||
|
||||
return (
|
||||
<MDXContent code={code} components={baseComponents as MDXComponents} />
|
||||
);
|
||||
|
Loading…
Reference in New Issue
Block a user