mirror of
https://github.com/ethereum/go-ethereum.git
synced 2026-05-12 11:06:40 +00:00
Update MDXComponents.tsx
This commit is contained in:
parent
963c1b1669
commit
46c2aa3cea
1 changed files with 16 additions and 17 deletions
|
|
@ -36,22 +36,6 @@ SyntaxHighlighter.registerLanguage('swift', swift);
|
||||||
|
|
||||||
const { header1, header2, header3, header4 } = textStyles;
|
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 Code = ({ className, ...code }: any) => {
|
||||||
const { colorMode } = useColorMode();
|
const { colorMode } = useColorMode();
|
||||||
const isDark = colorMode === 'dark';
|
const isDark = colorMode === 'dark';
|
||||||
|
|
@ -160,7 +144,22 @@ const MDXComponents = {
|
||||||
);
|
);
|
||||||
},
|
},
|
||||||
// tables
|
// 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
|
||||||
pre: ({ children }: any) => {
|
pre: ({ children }: any) => {
|
||||||
return (
|
return (
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue