Update MDXComponents.tsx

This commit is contained in:
Paul Wackerow 2022-11-21 18:18:19 -08:00
parent 963c1b1669
commit 46c2aa3cea
No known key found for this signature in database
GPG Key ID: BB63E296FE9CAB8D

@ -36,22 +36,6 @@ SyntaxHighlighter.registerLanguage('swift', swift);
const { header1, header2, header3, header4 } = textStyles;
const MdTable = ({ children }: any) => (
<Flex maxW='100vw' overflowX='scroll'>
<Table
variant='striped'
colorScheme='greenAlpha'
border='1px'
borderColor='blackAlpha.50'
mb={10}
size={{ base: 'sm', lg: 'md' }}
w='auto'
>
{children}
</Table>
</Flex>
)
const Code = ({ className, ...code }: any) => {
const { colorMode } = useColorMode();
const isDark = colorMode === 'dark';
@ -160,7 +144,22 @@ const MDXComponents = {
);
},
// tables
table: MdTable,
table: ({ children }: any) => (
<Flex maxW='min(100%, 100vw)' overflowX='scroll'>
<Table
variant='striped'
colorScheme='greenAlpha'
border='1px'
borderColor='blackAlpha.50'
mt={6}
mb={4}
size={{ base: 'sm', lg: 'md' }}
w='auto'
>
{children}
</Table>
</Flex>
),
// pre
pre: ({ children }: any) => {
return (