(children: ReactNode)
| 53 | ?.replace('language-', '') ?? ''; |
| 54 | |
| 55 | const getCodeChild = (children: ReactNode) => |
| 56 | Children.toArray(children).find((child) => |
| 57 | isValidElement<ElementWithCodeProps>(child), |
| 58 | ) as ReactElement<ElementWithCodeProps> | undefined; |
| 59 | |
| 60 | interface CodeWrapperProps { |
| 61 | children: ReactNode; |