Add more docs

This commit is contained in:
David Baker 2025-10-17 12:10:07 +01:00
parent 6d0a715ac0
commit b83b5f4ad6
3 changed files with 30 additions and 8 deletions

View File

@ -51,7 +51,6 @@ export interface Api extends LegacyModuleApiExtension, LegacyCustomisationsApiEx
// @alpha
export interface BuiltinsApi {
// (undocumented)
getRoomViewComponent(): React.ComponentType<RoomViewProps>;
}
@ -329,17 +328,11 @@ export type RuntimeModuleConstructor = new (api: ModuleApi) => RuntimeModule;
// @alpha
export interface SpacePanelItemProps {
// (undocumented)
className?: string;
// (undocumented)
contextMenuTooltip?: string;
// (undocumented)
icon?: JSX.Element;
// (undocumented)
label: string;
// (undocumented)
onSelected?(): void;
// (undocumented)
style?: React.CSSProperties;
}

View File

@ -21,5 +21,12 @@ export interface RoomViewProps {
* @alpha
*/
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.
*
* @alpha
* @returns The RoomView component.
*/
getRoomViewComponent(): React.ComponentType<RoomViewProps>;
}

View File

@ -12,12 +12,34 @@ import { JSX } from "react";
* @alpha
*/
export interface SpacePanelItemProps {
/**
* A CSS class name for the item
*/
className?: string;
/**
* An icon to show in the item
*/
icon?: JSX.Element;
/**
* The label to show in the item
*/
label: string;
/**
* A tooltip to show when hovering over the item
*/
contextMenuTooltip?: string;
/**
* Styles to apply to the item
*/
style?: React.CSSProperties;
//notificationState?: NotificationState;
/**
* Callback when the item is selected
*/
onSelected?(): void;
}