Move tooltip to ts
This commit is contained in:
parent
7533a8f80b
commit
63f78b0808
7 changed files with 170 additions and 113 deletions
|
@ -38,5 +38,10 @@ export enum Action {
|
|||
* Open the user settings. No additional payload information required.
|
||||
*/
|
||||
ViewUserSettings = "view_user_settings",
|
||||
|
||||
/**
|
||||
* Sets the current tooltip
|
||||
*/
|
||||
ViewTooltip = "view_tooltip",
|
||||
}
|
||||
|
||||
|
|
|
@ -17,6 +17,7 @@ limitations under the License.
|
|||
import { RoomMember } from "matrix-js-sdk/src/models/room-member";
|
||||
import { ActionPayload } from "../payloads";
|
||||
import { Action } from "../actions";
|
||||
import { Component } from "react";
|
||||
|
||||
export interface ViewUserPayload extends ActionPayload {
|
||||
action: Action.ViewUser,
|
||||
|
@ -27,3 +28,19 @@ export interface ViewUserPayload extends ActionPayload {
|
|||
*/
|
||||
member?: RoomMember;
|
||||
}
|
||||
|
||||
export interface ViewTooltipPayload extends ActionPayload {
|
||||
action: Action.ViewTooltip,
|
||||
|
||||
/*
|
||||
* The tooltip to render. If it's null the tooltip will not be rendered
|
||||
* We need the void type because of typescript headaches.
|
||||
*/
|
||||
tooltip: null | void | Element | Component<Element, any, any>;
|
||||
|
||||
/*
|
||||
* The parent under which to render the tooltip. Can be null to remove
|
||||
* the parent type.
|
||||
*/
|
||||
parent: null | Element
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue