Merge pull request #111 from element-hq/midhun/multiroom/builtins-api
Render more components through builtins api
This commit is contained in:
@@ -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;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user