@ministryofjustice/hmpps-digital-prison-reporting-frontend
Version:
The Digital Prison Reporting Frontend contains templates and code to help display data effectively in UI applications.
16 lines (15 loc) • 519 B
TypeScript
export interface TruncationOptions {
stringValue: string;
charLength?: number;
showMore?: boolean;
classes?: string;
}
export interface TruncationModel {
fullHtml: string;
truncatedHtml: string;
showMore: boolean;
isTruncated: boolean;
classes?: string | undefined;
}
export declare const initialiseTruncation: ({ stringValue, charLength, showMore, classes, }: TruncationOptions) => TruncationModel;
export declare const renderTruncateAsHtml: (options: TruncationOptions) => string;