forked from luxejs/communeai-app
-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathmdx-components.tsx
29 lines (27 loc) · 1.3 KB
/
mdx-components.tsx
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
import type { MDXComponents } from 'mdx/types'
import { CopyButton } from './app/components/CopyButton'
export function useMDXComponents(components: MDXComponents): MDXComponents {
return {
code: (props) => (
// <div style={{ display: 'inline-block', borderRadius: 10, minWidth: '100%' }}>
// <div style={{ display: 'flex', padding: '16px', backgroundColor: '#0D0F14', borderRadius: '0px 10px 0px 0px' }}>
// <div style={{ width: '0.8rem', height: '0.8rem', backgroundColor: '#FF5F56', borderRadius: '100%', marginRight: 8 }} />
// <div style={{ width: '0.8rem', height: '0.8rem', backgroundColor: '#FFBD2D', borderRadius: '100%', marginRight: 8 }} />
// <div style={{ width: '0.8rem', height: '0.8rem', backgroundColor: '#26C940', borderRadius: '100%', marginRight: 8 }} />
// </div>
// <div
// style={{ width: '100%', backgroundColor: '#22212C', display: 'inline-flex', padding: '16px', borderRadius: '0px 0px 10px 0px' }}
// >
<div className='flex items-center'>
<div className='ml-20'>
<code {...props}>{props.children}</code>
</div>
<CopyButton code={props.children as string} />
</div>
// </div>
// </div>
// </div>
),
...components,
}
}