Move tooltip to ts

This commit is contained in:
Jorik Schellekens 2020-05-25 13:40:05 +01:00
parent 7533a8f80b
commit 63f78b0808
7 changed files with 170 additions and 113 deletions

View file

@ -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
}