import { type DataTestId, type MaskingProps, type StylingProps, type WithChildren } from '@dynatrace/strato-components/core'; import type { HighlightLanguage } from './HighlightExtended.js'; import type { FocusEvents } from '../../core/types/events.js'; /** * @public */ export interface CodeSnippetProps extends WithChildren, FocusEvents, StylingProps, DataTestId, MaskingProps { /** * Code language to be used to run highlighting on the given code. */ language?: HighlightLanguage; /** * Whether the copy button should be displayed. * @defaultValue true */ allowCopy?: boolean; /** * Whether line numbers should be shown. * @defaultValue true */ showLineNumbers?: boolean; /** * Height of the code container. If this is known in advance, then very long * code snippets will still be able to fit into the container while also * having scrolling enabled. Value is given in px. */ maxHeight?: number; /** * Whether the content breaks into new lines automatically or not. * @defaultValue false */ lineBreaks?: boolean; /** * Callback fired when copy button is clicked and the code snippet was copied. */ onCopy?: () => void; /** * CodeSnippet layout size, 'default' for standard spacing and 'condensed' for reduced font size, padding and margins. * @defaultValue 'default' */ size?: 'default' | 'condensed'; } /** * Use the `CodeSnippet` to display a code block in a read-only context. * By default, the code is formatted but not highlighted. * @public */ export declare const CodeSnippet: (props: CodeSnippetProps & import("react").RefAttributes) => React.ReactElement | null;