Appearance
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:
Prop | Type | Default | Note |
---|---|---|---|
language | String | - | Define code language. |
className | String | - | Overrides or extends the component's styles. |