({ language, children, ...others }: CodeDirectProps)
| 166 | } |
| 167 | |
| 168 | export const Code = ({ language, children, ...others }: CodeDirectProps) => { |
| 169 | if (language === '') |
| 170 | return ( |
| 171 | <MantineCode className={classes['inline-code']} {...others}> |
| 172 | {children} |
| 173 | </MantineCode> |
| 174 | ); |
| 175 | |
| 176 | const code = children?.toString() ?? ''; |
| 177 | |
| 178 | return ( |
| 179 | <CodeWrapper language={highlightLanguage(language)} code={code}> |
| 180 | <CodeHighlight code={code} language={language} /> |
| 181 | </CodeWrapper> |
| 182 | ); |
| 183 | }; |
nothing calls this directly
no test coverage detected