mirror of https://github.com/vector-im/riot-web
Convert HeaderButton to TS
parent
0f59e34a3a
commit
23e4b67a69
|
@ -29,7 +29,7 @@ interface IProps {
|
|||
// click handler
|
||||
onClick: () => void;
|
||||
// The badge to display above the icon
|
||||
badge: React.ReactNode;
|
||||
badge?: React.ReactNode;
|
||||
// The parameters to track the click event
|
||||
analytics: string[];
|
||||
|
||||
|
|
|
@ -23,7 +23,7 @@ import dis from '../../../dispatcher/dispatcher';
|
|||
import RightPanelStore from "../../../stores/RightPanelStore";
|
||||
import {RightPanelPhases} from "../../../stores/RightPanelStorePhases";
|
||||
import {Action} from '../../../dispatcher/actions';
|
||||
import {SetRightPanelPhasePayload} from '../../../dispatcher/payloads/SetRightPanelPhasePayload';
|
||||
import {SetRightPanelPhasePayload, SetRightPanelPhaseRefireParams} from '../../../dispatcher/payloads/SetRightPanelPhasePayload';
|
||||
|
||||
export enum HeaderKind {
|
||||
Room = "room",
|
||||
|
@ -65,7 +65,7 @@ export default class HeaderButtons extends React.Component<IProps, IState> {
|
|||
// Ignore - intended to be overridden by subclasses
|
||||
}
|
||||
|
||||
setPhase(phase: RightPanelPhases, extras) {
|
||||
setPhase(phase: RightPanelPhases, extras?: Partial<SetRightPanelPhaseRefireParams>) {
|
||||
dis.dispatch<SetRightPanelPhasePayload>({
|
||||
action: Action.SetRightPanelPhase,
|
||||
phase: phase,
|
||||
|
|
|
@ -29,8 +29,10 @@ export interface SetRightPanelPhasePayload extends ActionPayload {
|
|||
export interface SetRightPanelPhaseRefireParams {
|
||||
// XXX: Fix after the types are defiend in matrix-js-sdk
|
||||
// No appropriate types exist yet for the fields
|
||||
members: any;
|
||||
verificationRequest: typeof VerificationRequest;
|
||||
groudId: string;
|
||||
groupRoomId: string;
|
||||
members?: any;
|
||||
verificationRequest?: typeof VerificationRequest;
|
||||
groudId?: string;
|
||||
groupRoomId?: string;
|
||||
// XXX: 'view_3pid_invite' action's payload
|
||||
event?: any;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue