UNPKG

matrix-react-sdk

Version:
66 lines (65 loc) 2.8 kB
import { Room } from "matrix-js-sdk/src/matrix"; import React from "react"; import { IProps as IContextMenuProps } from "../../structures/ContextMenu"; import { ButtonEvent } from "../elements/AccessibleButton"; export interface RoomGeneralContextMenuProps extends IContextMenuProps { room: Room; /** * Called when the 'favourite' option is selected, after the menu has processed * the mouse or keyboard event. * @param event The event that caused the option to be selected. */ onPostFavoriteClick?: (event: ButtonEvent) => void; /** * Called when the 'low priority' option is selected, after the menu has processed * the mouse or keyboard event. * @param event The event that caused the option to be selected. */ onPostLowPriorityClick?: (event: ButtonEvent) => void; /** * Called when the 'invite' option is selected, after the menu has processed * the mouse or keyboard event. * @param event The event that caused the option to be selected. */ onPostInviteClick?: (event: ButtonEvent) => void; /** * Called when the 'copy link' option is selected, after the menu has processed * the mouse or keyboard event. * @param event The event that caused the option to be selected. */ onPostCopyLinkClick?: (event: ButtonEvent) => void; /** * Called when the 'settings' option is selected, after the menu has processed * the mouse or keyboard event. * @param event The event that caused the option to be selected. */ onPostSettingsClick?: (event: ButtonEvent) => void; /** * Called when the 'forget room' option is selected, after the menu has processed * the mouse or keyboard event. * @param event The event that caused the option to be selected. */ onPostForgetClick?: (event: ButtonEvent) => void; /** * Called when the 'leave' option is selected, after the menu has processed * the mouse or keyboard event. * @param event The event that caused the option to be selected. */ onPostLeaveClick?: (event: ButtonEvent) => void; /** * Called when the 'mark as read' option is selected, after the menu has processed * the mouse or keyboard event. * @param event The event that caused the option to be selected. */ onPostMarkAsReadClick?: (event: ButtonEvent) => void; /** * Called when the 'mark as unread' option is selected, after the menu has processed * the mouse or keyboard event. * @param event The event that caused the option to be selected. */ onPostMarkAsUnreadClick?: (event: ButtonEvent) => void; } /** * Room context menu accessible via the room list. */ export declare const RoomGeneralContextMenu: React.FC<RoomGeneralContextMenuProps>;