Specify options for the original component.

This commit is contained in:
Half-Shot
2025-06-05 09:58:51 +01:00
parent 546861811c
commit e2ae6f2288
3 changed files with 22 additions and 10 deletions
@@ -70,16 +70,16 @@ export interface CustomComponentsApi {
export type CustomMessageComponentProps = {
mxEvent: MatrixEvent;
highlights?: string[];
showUrlPreview?: boolean;
forExport?: boolean;
};
// Warning: (ae-incompatible-release-tags) The symbol "CustomMessageRenderFunction" is marked as @beta, but its signature references "CustomMessageComponentProps" which is marked as @alpha
// Warning: (ae-incompatible-release-tags) The symbol "CustomMessageRenderFunction" is marked as @beta, but its signature references "OriginalComponentProps" which is marked as @alpha
//
// @beta
export type CustomMessageRenderFunction = (
props: CustomMessageComponentProps,
originalComponent?: () => React.JSX.Element) => JSX.Element | null;
originalComponent?: (props?: OriginalComponentProps) => React.JSX.Element) => JSX.Element | null;
// @alpha @deprecated (undocumented)
export interface DirectoryCustomisations {
@@ -205,6 +205,11 @@ export class ModuleLoader {
start(): Promise<void>;
}
// @alpha
export type OriginalComponentProps = {
showUrlPreview?: boolean;
};
// @alpha @deprecated (undocumented)
export interface RoomListCustomisations<Room> {
isRoomVisible?(room: Room): boolean;