Skip to content

Commit

Permalink
docs: fix TS code snippet for MDX example (#57988)
Browse files Browse the repository at this point in the history
  • Loading branch information
mcexit authored Dec 22, 2023
1 parent f999d63 commit b57a2c8
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -354,7 +354,7 @@ To do this, create a `mdx-components.tsx` file at the root of your application (

```tsx filename="mdx-components.tsx" switcher
import type { MDXComponents } from 'mdx/types'
import Image from 'next/image'
import Image, { ImageProps } from 'next/image'

// This file allows you to provide custom React components
// to be used in MDX files. You can import and use any
Expand All @@ -369,7 +369,7 @@ export function useMDXComponents(components: MDXComponents): MDXComponents {
<Image
sizes="100vw"
style={{ width: '100%', height: 'auto' }}
{...props}
{...(props as ImageProps)}
/>
),
...components,
Expand Down

0 comments on commit b57a2c8

Please sign in to comment.