[WIKI-773] refactor: editor mention components and hooks (#8111)
This commit is contained in:
parent
c04ae51d20
commit
c65e2c4aab
17 changed files with 84 additions and 96 deletions
|
|
@ -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[]>;
|
||||
};
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue