Merge pull request #111 from element-hq/midhun/multiroom/builtins-api

Render more components through builtins api
This commit is contained in:
R Midhun Suresh 2025-10-27 17:59:12 +05:30 committed by GitHub
commit 0f6ac0a841
2 changed files with 14 additions and 5 deletions

View File

@ -50,7 +50,8 @@ export interface Api extends LegacyModuleApiExtension, LegacyCustomisationsApiEx
// @alpha
export interface BuiltinsApi {
getRoomViewComponent(): React.ComponentType<RoomViewProps>;
renderRoomAvatar(roomId: string, size?: string): React.ReactNode;
renderRoomView(roomId: string): React.ReactNode;
}
// @alpha @deprecated (undocumented)

View File

@ -25,11 +25,19 @@ export interface RoomViewProps {
*/
export interface BuiltinsApi {
/**
* Returns the RoomView component used by Element Web to render a room such that
* modules can render it as part of their own custom room views.
* Render room avatar component from element-web.
*
* @alpha
* @returns The RoomView component.
* @param roomId - Id of the room
* @param size - Size of the avatar to render
*/
getRoomViewComponent(): React.ComponentType<RoomViewProps>;
renderRoomAvatar(roomId: string, size?: string): React.ReactNode;
/**
* Render room view component from element-web.
*
* @alpha
* @param roomId - Id of the room
*/
renderRoomView(roomId: string): React.ReactNode;
}