[WIKI-773] refactor: editor mention components and hooks (#8111)

This commit is contained in:
Aaryan Khandelwal 2025-11-17 14:07:37 +05:30 committed by GitHub
parent c04ae51d20
commit c65e2c4aab
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
17 changed files with 84 additions and 96 deletions

View file

@ -16,10 +16,10 @@ export type TMentionSection = {
items: TMentionSuggestion[];
};
export type TMentionComponentProps = Pick<TMentionSuggestion, "entity_identifier" | "entity_name">;
export type TCallbackMentionComponentProps = Pick<TMentionSuggestion, "entity_identifier" | "entity_name">;
export type TMentionHandler = {
getMentionedEntityDetails?: (entity_identifier: string) => { display_name: string } | undefined;
renderComponent: (props: TMentionComponentProps) => React.ReactNode;
renderComponent: (props: TCallbackMentionComponentProps) => React.ReactNode;
searchCallback?: (query: string) => Promise<TMentionSection[]>;
};