We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 0764472 commit 05e9fbcCopy full SHA for 05e9fbc
src/components/Code.tsx
@@ -142,7 +142,7 @@ function CodePanel({
142
label?: string
143
code?: string
144
}) {
145
- let child = Children.only(children)
+ let child = Children.toArray(children).find((e) => isValidElement(e));
146
147
if (isValidElement(child)) {
148
const props = child.props as { tag?: string; label?: string; code?: string }
0 commit comments