import { ReactElement } from 'react'; export interface CodeSnippetProps { code: string; highlightedCode?: string; copyRanges?: number[][]; maxHeight?: number; onCopy?: (text: string, chunkIndex?: number) => void; highlightThemeCss?: string; characterWidth?: number; } declare function CodeSnippet({ code, highlightedCode, copyRanges, maxHeight, onCopy, highlightThemeCss, characterWidth }: CodeSnippetProps): ReactElement; declare namespace CodeSnippet { var propTypes: { /** Raw (unhighlighted) code. When the user clicks a copy button, this is what they'll get. If no `highlightedCode` is provided, `code` is displayed. */ code: any; /** The HTML output of running code through a syntax highlighter. If this is not provided, `code` is displayed, instead. The default theme CSS assumes the highlighter is [`highlight.js`](https://github.com/isagalaev/highlight.js). If you are using another highlighter, provide your own theme. */ highlightedCode: any; /** Specific line ranges that should be independently copiable. Each range is a two-value array, consisting of the starting and ending line. If this is not provided, the entire snippet is copiable. */ copyRanges: any; /** A maximum height for the snippet. If the code exceeds this height, the snippet will scroll internally. */ maxHeight: any; /** A callback that is invoked when the snippet (or a chunk of the snippet) is copied. If `copyRanges` are provided, the callback is passed the index (0-based) of the chunk that was copied. */ onCopy: any; /** CSS that styles the highlighted code. The default theme is a [`highlight.js` theme](https://highlightjs.readthedocs.io/en/latest/style-guide.html#defining-a-theme) theme. It is the dark theme used on mapbox.com's installation flow. */ highlightThemeCss: any; /** The width of a character in the theme's monospace font, used for indentation. If you use a font or font-size different than the default theme, you may need to change this value. */ characterWidth: any; }; } export default CodeSnippet;