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