@types/react-highlight.js
TypeScript icon, indicating that this package has built-in type declarations

1.0.5 • Public • Published

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.

Readme

Keywords

none

Package Sidebar

Install

npm i @types/react-highlight.js

Weekly Downloads

545

Version

1.0.5

License

MIT

Unpacked Size

4.24 kB

Total Files

5

Last publish

Collaborators

  • types