@wordpress/components
Version:
UI components for WordPress.
18 lines • 693 B
TypeScript
import type { TruncateProps } from './types';
export declare const TRUNCATE_ELLIPSIS = "\u2026";
export declare const TRUNCATE_TYPE: {
readonly auto: "auto";
readonly head: "head";
readonly middle: "middle";
readonly tail: "tail";
readonly none: "none";
};
export declare const TRUNCATE_DEFAULT_PROPS: {
ellipsis: string;
ellipsizeMode: "auto";
limit: number;
numberOfLines: number;
};
export declare function truncateMiddle(word: string, headLength: number, tailLength: number, ellipsis: string): string;
export declare function truncateContent(words: string | undefined, props: Omit<TruncateProps, 'children'>): string;
//# sourceMappingURL=utils.d.ts.map