MCPcopy Create free account
hub / github.com/flatlogic/react-material-admin / Code

Function Code

src/components/Code/Code.js:7–22  ·  view source on GitHub ↗
({ children, row, inline })

Source from the content-addressed store, hash-verified

5import { docco } from 'react-syntax-highlighter/dist/esm/styles/hljs';
6
7const Code = ({ children, row, inline }) => {
8 const props = { row, inline };
9 const classes = useStyles(props);
10 return (
11 <div className={classes.codeContainer}>
12 <SyntaxHighlighter
13 className={classes.codeComponent}
14 language='javascript'
15 style={docco}
16 customStyle={inline ? { padding: '2px 6px', margin: '-0.5em 0' } : {}}
17 >
18 {children}
19 </SyntaxHighlighter>
20 </div>
21 );
22};
23
24export default Code;

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected