mirror of
https://github.com/vector-im/element-web.git
synced 2026-05-06 04:36:21 +02:00
Merge pull request #111 from element-hq/midhun/multiroom/builtins-api
Render more components through builtins api
This commit is contained in:
commit
0f6ac0a841
@ -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)
|
||||
|
||||
@ -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;
|
||||
}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user