Skip to content

Commit 1f4147b

Browse files
committed
chore(content): type the table renderer instead of any
Uses `ComponentPropsWithoutRef<'table'>` so the destructured and forwarded props are checked. The surrounding renderers in this file still take `any`; converting them is a separate cleanup, not something to fold into a mobile layout fix.
1 parent 66c3395 commit 1f4147b

1 file changed

Lines changed: 2 additions & 1 deletion

File tree

apps/sim/lib/content/mdx.tsx

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
import type { ComponentPropsWithoutRef } from 'react'
12
import clsx from 'clsx'
23
import type { MDXRemoteProps } from 'next-mdx-remote/rsc'
34
import { CodeBlock } from '@/lib/content/code'
@@ -132,7 +133,7 @@ export const mdxComponents: MDXRemoteProps['components'] = {
132133
* scroll area — narrow enough that tables which already fit (two or three
133134
* columns on a tablet, anything on desktop) never gain a scrollbar.
134135
*/
135-
table: ({ className, ...props }: any) => (
136+
table: ({ className, ...props }: ComponentPropsWithoutRef<'table'>) => (
136137
<div className='my-6 w-full overflow-x-auto'>
137138
<table {...props} className={clsx('my-0 min-w-[520px]', className)} />
138139
</div>

0 commit comments

Comments
 (0)