Updates
This commit is contained in:
@@ -23,6 +23,7 @@ export function useMDXComponents(params?: Params) {
|
||||
pre: ({ children, ...props }) => {
|
||||
if (React.isValidElement(children) && children.props) {
|
||||
return (
|
||||
// @ts-ignore
|
||||
<CodeBlock {...props} backgroundColor={codeBgColor}>
|
||||
{/* @ts-ignore */}
|
||||
{children.props.children}
|
||||
@@ -30,6 +31,7 @@ export function useMDXComponents(params?: Params) {
|
||||
);
|
||||
}
|
||||
return (
|
||||
// @ts-ignore
|
||||
<CodeBlock {...props} backgroundColor={codeBgColor}>
|
||||
{children}
|
||||
</CodeBlock>
|
||||
@@ -62,6 +64,7 @@ export function useMDXComponents(params?: Params) {
|
||||
);
|
||||
},
|
||||
img: (props) => (
|
||||
// @ts-ignore
|
||||
<img
|
||||
{...props}
|
||||
className="w-full h-auto shadow-lg rounded-default overflow-hidden"
|
||||
|
||||
Reference in New Issue
Block a user