fix: broken docs tables (#361)

This commit is contained in:
Jacob Marshall
2025-01-17 14:11:57 +00:00
committed by GitHub
parent 23e2a2e3ff
commit 7632e6a464
2 changed files with 9 additions and 8 deletions
@@ -1,18 +1,19 @@
import type { DetailedHTMLProps, TableHTMLAttributes } from 'react'
import { Table } from '@mantine/core'
import type React from 'react'
import type { DetailedHTMLProps, TableHTMLAttributes, JSX } from 'react'
import { Table, ScrollArea } from '@mantine/core'
type MdxTableProps = DetailedHTMLProps<
TableHTMLAttributes<HTMLTableElement>,
HTMLTableElement
>
function MdxTable(props: MdxTableProps): React.JSX.Element {
function MdxTable(props: MdxTableProps): JSX.Element {
const { children, ...rest } = props
return (
<Table highlightOnHover stickyHeader stickyHeaderOffset={60} {...rest}>
{children}
</Table>
<ScrollArea type="auto">
<Table highlightOnHover {...rest}>
{children}
</Table>
</ScrollArea>
)
}
@@ -50,7 +50,7 @@ Handles client side page navigation quickly. Useful for internal links, or for w
router.push(path, options)
```
| Prop | Type | Default value | Description |
| Name | Type | Default value | Description |
| ---------------- | ------------------- | ------------- | ----------------------------------------------------------------- |
| `path` | `string` (Required) | - | The path of the page you want to navigate to. |
| `options` | `PushOptions` | - | Optional config object for additional control. |