File tree Expand file tree Collapse file tree 1 file changed +16
-5
lines changed
packages/element-web-module-api/src/api Expand file tree Collapse file tree 1 file changed +16
-5
lines changed Original file line number Diff line number Diff line change @@ -7,20 +7,31 @@ Please see LICENSE files in the repository root for full details.
77
88import { JSX } from "react" ;
99
10- interface SpacePanelItemProps {
11- isPanelCollapsed : boolean ;
12- }
10+ /**
11+ * Any kind of event that can trigger a button
12+ * @alpha
13+ */
14+ export type ButtonEvent = React . MouseEvent < Element > | React . KeyboardEvent < Element > | React . FormEvent < Element > ;
1315
1416/**
1517 * The type of the function used to render a space panel item.
1618 * @alpha
1719 */
18- export type SpacePanelItemRenderFunction = ( props : SpacePanelItemProps ) => JSX . Element ;
20+ export interface SpacePanelItemProps {
21+ spaceKey ?: string ;
22+ className ?: string ;
23+ icon ?: JSX . Element ;
24+ label : string ;
25+ contextMenuTooltip ?: string ;
26+ style ?: React . CSSProperties ;
27+ //notificationState?: NotificationState;
28+ onClick ?( ev ?: ButtonEvent ) : void ;
29+ }
1930
2031/**
2132 * API for inserting extra UI into Element Web.
2233 * @alpha Subject to change.
2334 */
2435export interface ExtrasApi {
25- addSpacePanelItem ( renderer : SpacePanelItemRenderFunction ) : void ;
36+ addSpacePanelItem ( props : SpacePanelItemProps ) : void ;
2637}
You can’t perform that action at this time.
0 commit comments