Fix the table element overflow (#787)

* add terminals.run blog for example
* fix table element overflow
This commit is contained in:
Terminels
2023-11-21 18:17:58 +08:00
committed by GitHub
parent 052165a30c
commit 0a8e1dbbdc
6 changed files with 38 additions and 8 deletions

View File

@ -4,11 +4,13 @@ import BlogNewsletterForm from 'pliny/ui/BlogNewsletterForm'
import type { MDXComponents } from 'mdx/types'
import Image from './Image'
import CustomLink from './Link'
import TableWrapper from './TableWrapper'
export const components: MDXComponents = {
Image,
TOCInline,
a: CustomLink,
pre: Pre,
table: TableWrapper,
BlogNewsletterForm,
}

View File

@ -0,0 +1,9 @@
const TableWrapper = ({ children }) => {
return (
<div className="w-full overflow-x-auto">
<table>{children}</table>
</div>
)
}
export default TableWrapper