Installation
npm install --save @types/react-highlight.js
Summary
This package contains type definitions for react-highlight.js (https://github.com/bvaughn/react-highlight.js).
Details
Files were exported from https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/react-highlight.js.
index.d.ts
import { ComponentClass, ReactNode } from "react";
/**
* Props for a Highlight component.
*/
export interface HighlightProps {
/**
* Language name to use as a class to signal type to highlight.js.
*/
language: string;
/**
* Language name to use as a class to signal type to highlight.js.
*/
className?: string | undefined;
/**
* Inline styles to apply to the rendered <pre> tag.
*/
style?: React.CSSProperties | undefined;
/**
* Content that will be highlighted
*/
children?: ReactNode | undefined;
}
/**
* A lightweight React wrapper around the Highlight.js syntax highlighting library.
*/
declare const Highlight: ComponentClass<HighlightProps>;
export default Highlight;
Additional Details
- Last updated: Tue, 07 Nov 2023 09:09:39 GMT
- Dependencies: @types/react
Credits
These definitions were written by Christian Murphy.