import React from "react"; import { ContentBlobTogglerProps } from "./ContentBlobToggler"; export interface StringPreviewContentBlobTogglerProps extends Omit { /** * The preview content will be cut to this length if it is too long. */ previewMaxLength?: number; /** * The content string. * If it is smaller than `previewMaxLength` this will be displayed in full, else `fullviewContent` will be displayed. */ content: string; /** * Use only parts of `content` in the preview. * `firstMarkdownSection` uses the content until the first double line return. */ useOnly?: "firstNonEmptyLine" | "firstMarkdownSection"; /** * If enabled the preview is rendered as Markdown. */ renderPreviewAsMarkdown?: boolean; /** * White-listing of HTML elements that will be rendered when renderPreviewAsMarkdown is enabled. */ allowedHtmlElementsInPreview?: string[]; /** * Allows to add non-string elements at the end of the content if the full description is shown, i.e. no toggler is necessary. * This allows to add non-string elements to both the full-view content and the pure string content. */ noTogglerContentSuffix?: React.JSX.Element; } /** Version of the content toggler for text centric content. */ export declare function StringPreviewContentBlobToggler({ className, previewMaxLength, toggleExtendText, toggleReduceText, content, fullviewContent, startExtended, useOnly, renderPreviewAsMarkdown, allowedHtmlElementsInPreview, noTogglerContentSuffix, ...otherContentBlobTogglerProps }: StringPreviewContentBlobTogglerProps): React.JSX.Element; /** * Takes the first non-empty line from a preview string. */ declare function firstNonEmptyLine(preview: string): string; export declare const stringPreviewContentBlobTogglerUtils: { firstNonEmptyLine: typeof firstNonEmptyLine; }; export {};