Merge pull request #114 from element-hq/florianduros/ew-api-room-view-props
This commit is contained in:
@@ -60,7 +60,7 @@ export interface Api extends LegacyModuleApiExtension, LegacyCustomisationsApiEx
|
|||||||
// @alpha
|
// @alpha
|
||||||
export interface BuiltinsApi {
|
export interface BuiltinsApi {
|
||||||
renderRoomAvatar(roomId: string, size?: string): React.ReactNode;
|
renderRoomAvatar(roomId: string, size?: string): React.ReactNode;
|
||||||
renderRoomView(roomId: string): React.ReactNode;
|
renderRoomView(roomId: string, props?: RoomViewProps): React.ReactNode;
|
||||||
}
|
}
|
||||||
|
|
||||||
// @alpha @deprecated (undocumented)
|
// @alpha @deprecated (undocumented)
|
||||||
@@ -354,7 +354,10 @@ export interface RoomListStoreApi {
|
|||||||
|
|
||||||
// @alpha
|
// @alpha
|
||||||
export interface RoomViewProps {
|
export interface RoomViewProps {
|
||||||
roomId?: string;
|
// (undocumented)
|
||||||
|
hideComposer?: boolean;
|
||||||
|
// (undocumented)
|
||||||
|
hideHeader?: boolean;
|
||||||
}
|
}
|
||||||
|
|
||||||
// @alpha @deprecated (undocumented)
|
// @alpha @deprecated (undocumented)
|
||||||
|
|||||||
@@ -10,10 +10,14 @@ Please see LICENSE files in the repository root for full details.
|
|||||||
* @alpha Subject to change.
|
* @alpha Subject to change.
|
||||||
*/
|
*/
|
||||||
export interface RoomViewProps {
|
export interface RoomViewProps {
|
||||||
/**
|
/*
|
||||||
* The ID of the room to render.
|
* If true, the room header will be hidden.
|
||||||
*/
|
*/
|
||||||
roomId?: string;
|
hideHeader?: boolean;
|
||||||
|
/*
|
||||||
|
* If true, the message composer will be hidden.
|
||||||
|
*/
|
||||||
|
hideComposer?: boolean;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -38,6 +42,7 @@ export interface BuiltinsApi {
|
|||||||
*
|
*
|
||||||
* @alpha
|
* @alpha
|
||||||
* @param roomId - Id of the room
|
* @param roomId - Id of the room
|
||||||
|
* @param props - Additional props to pass to the room view
|
||||||
*/
|
*/
|
||||||
renderRoomView(roomId: string): React.ReactNode;
|
renderRoomView(roomId: string, props?: RoomViewProps): React.ReactNode;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user