Skip to content

Commit 081c33b

Browse files
committed
Add more docs
1 parent 79d1cfa commit 081c33b

File tree

3 files changed

+30
-8
lines changed

3 files changed

+30
-8
lines changed

packages/element-web-module-api/element-web-module-api.api.md

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,6 @@ export interface Api extends LegacyModuleApiExtension, LegacyCustomisationsApiEx
5151

5252
// @alpha
5353
export interface BuiltinsApi {
54-
// (undocumented)
5554
getRoomViewComponent(): React.ComponentType<RoomViewProps>;
5655
}
5756

@@ -329,17 +328,11 @@ export type RuntimeModuleConstructor = new (api: ModuleApi) => RuntimeModule;
329328

330329
// @alpha
331330
export interface SpacePanelItemProps {
332-
// (undocumented)
333331
className?: string;
334-
// (undocumented)
335332
contextMenuTooltip?: string;
336-
// (undocumented)
337333
icon?: JSX.Element;
338-
// (undocumented)
339334
label: string;
340-
// (undocumented)
341335
onSelected?(): void;
342-
// (undocumented)
343336
style?: React.CSSProperties;
344337
}
345338

packages/element-web-module-api/src/api/builtins.ts

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,5 +21,12 @@ export interface RoomViewProps {
2121
* @alpha
2222
*/
2323
export interface BuiltinsApi {
24+
/**
25+
* Returns the RoomView component used by Element Web to render a room such that
26+
* modules can render it as part of their own custom room views.
27+
*
28+
* @alpha
29+
* @returns The RoomView component.
30+
*/
2431
getRoomViewComponent(): React.ComponentType<RoomViewProps>;
2532
}

packages/element-web-module-api/src/api/extras.ts

Lines changed: 23 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,12 +12,34 @@ import { JSX } from "react";
1212
* @alpha
1313
*/
1414
export interface SpacePanelItemProps {
15+
/**
16+
* A CSS class name for the item
17+
*/
1518
className?: string;
19+
20+
/**
21+
* An icon to show in the item
22+
*/
1623
icon?: JSX.Element;
24+
25+
/**
26+
* The label to show in the item
27+
*/
1728
label: string;
29+
30+
/**
31+
* A tooltip to show when hovering over the item
32+
*/
1833
contextMenuTooltip?: string;
34+
35+
/**
36+
* Styles to apply to the item
37+
*/
1938
style?: React.CSSProperties;
20-
//notificationState?: NotificationState;
39+
40+
/**
41+
* Callback when the item is selected
42+
*/
2143
onSelected?(): void;
2244
}
2345

0 commit comments

Comments
 (0)