diff --git a/src/theme/MDXComponents.tsx b/src/theme/MDXComponents.tsx index 3b62310ab8..b106671a1a 100644 --- a/src/theme/MDXComponents.tsx +++ b/src/theme/MDXComponents.tsx @@ -27,9 +27,25 @@ const SwitchTech: React.FC = ({ children }) => { return

{children}

} -// TODO: we should fix this const ParallelBlocks: React.FC = ({ children }) => { - return <>{children} + const childArray = React.Children.toArray(children).map(child => { + if (React.isValidElement(child)) { + return
+ {child.props.content} +
{child}
+
+ } else { + return
+
{child}
+
+ } + }); + + return
+
+ {childArray} +
+
} type ButtonColor = 'red' | 'green' | 'grey' | 'grey-bg' | 'dark'