Skip to content

Highlighter

EHighlighter syntax highlights code snippets. To apply, you must provide the code as a string within the component.

Import

jsx
import EHighlighter from "@components/UI/EHighlighter";

Usage

jsx
const HighlighterExample = () => {

  return (
     <EHighlighter language="js">`const var = 1`</EHighlighter>
  );
};

export default HighlighterExample;

Props

For EHighlighter component, the following props are available:

PropTypeDefaultNote
languageString-Define code language.
classNameString-Overrides or extends the component's styles.

COPYRIGHT