/[sudobot]/branches/9.x-dev/docs/mdx-components.tsx
ViewVC logotype

Contents of /branches/9.x-dev/docs/mdx-components.tsx

Parent Directory Parent Directory | Revision Log Revision Log


Revision 577 - (show annotations)
Mon Jul 29 18:52:37 2024 UTC (8 months ago) by rakinar2
File MIME type: application/typescript
File size: 679 byte(s)
chore: add old version archive branches (2.x to 9.x-dev)
1 import { Skeleton } from "@mui/material";
2 import type { MDXComponents } from "mdx/types";
3 import Image from "next/image";
4 import { ComponentProps } from "react";
5 import ImageWithSkeleton from "./components/MDX/ImageWithSkeleton";
6
7 export function useMDXComponents(components: MDXComponents): MDXComponents {
8 return {
9 ...components,
10 Image: (props: ComponentProps<typeof Image>) => <Image {...props} />,
11 ImageWithSkeleton: (
12 props: ComponentProps<typeof ImageWithSkeleton>,
13 ) => <ImageWithSkeleton {...props} />,
14 Skeleton: (props: ComponentProps<typeof Skeleton>) => (
15 <Skeleton {...props} />
16 ),
17 };
18 }

[email protected]
ViewVC Help
Powered by ViewVC 1.1.26