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
2 changed files with 14 additions and 5 deletions
@@ -50,7 +50,8 @@ export interface Api extends LegacyModuleApiExtension, LegacyCustomisationsApiEx
// @alpha // @alpha
export interface BuiltinsApi { export interface BuiltinsApi {
getRoomViewComponent(): React.ComponentType<RoomViewProps>; renderRoomAvatar(roomId: string, size?: string): React.ReactNode;
renderRoomView(roomId: string): React.ReactNode;
} }
// @alpha @deprecated (undocumented) // @alpha @deprecated (undocumented)
@@ -25,11 +25,19 @@ export interface RoomViewProps {
*/ */
export interface BuiltinsApi { export interface BuiltinsApi {
/** /**
* Returns the RoomView component used by Element Web to render a room such that * Render room avatar component from element-web.
* modules can render it as part of their own custom room views.
* *
* @alpha * @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;
} }