All Downloads are FREE. Search and download functionalities are using the official Maven repository.

META-INF.resources.frontend.react-syntax-highlighter-prism.tsx Maven / Gradle / Ivy

The newest version!
import {type ReactElement} from 'react';
import { Prism as SyntaxHighlighter } from 'react-syntax-highlighter';
import * as styles from 'react-syntax-highlighter/dist/esm/styles/prism';
import {ReactAdapterElement, type RenderHooks} from "Frontend/generated/flow/ReactAdapter";
import React from 'react';

class SyntaxHighlighterPrismElement extends ReactAdapterElement {

    protected override render(hooks: RenderHooks): ReactElement | null {
      const [language] = hooks.useState("language"); 
      const [content] =  hooks.useState("content");
      const [stylename] = hooks.useState("stylename");
      const [showLineNumbers] = hooks.useState("showLineNumbers");
      const [wrapLongLines] = hooks.useState("wrapLongLines");

      return 
      			{content}
      		;
    }
}
  
customElements.define("syntax-highlighter-prism",SyntaxHighlighterPrismElement);




© 2015 - 2024 Weber Informatics LLC | Privacy Policy