@medalsocial/meda
Version:
Shared Meda UI shell and runtime package.
13 lines (12 loc) • 433 B
TypeScript
export type ContentPartType = 'text' | 'mention' | 'hashtag' | 'url';
export interface ContentPart {
type: ContentPartType;
value: string;
}
/**
* Split a content string into typed parts so platform components can
* apply per-platform styling for mentions, hashtags, and URLs.
*
* Empty strings return an empty array (callers can render nothing).
*/
export declare function splitContent(content: string): ContentPart[];