You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 

20 lines
553 B

  1. import PropTypes from 'prop-types';
  2. // third-party
  3. import SyntaxHighlighter from 'react-syntax-highlighter';
  4. import { a11yDark } from 'react-syntax-highlighter/dist/esm/styles/hljs';
  5. // ==============================|| CODE HIGHLIGHTER ||============================== //
  6. export default function SyntaxHighlight({ children, ...others }) {
  7. return (
  8. <SyntaxHighlighter language="javacript" showLineNumbers style={a11yDark} {...others}>
  9. {children}
  10. </SyntaxHighlighter>
  11. );
  12. }
  13. SyntaxHighlight.propTypes = {
  14. children: PropTypes.node
  15. };