@microsoft/teams-js
Version:
Microsoft Client SDK for building app for Microsoft hosts
31 lines (30 loc) • 1.5 kB
TypeScript
/**
* Provides APIs to interact with the app button part of the SDK.
* @module
*/
import { handlerFunctionType } from './pages';
/**
* Registers a handler for clicking the app button.
* Only one handler can be registered at a time. A subsequent registration replaces an existing registration.
* @param handler - The handler to invoke when the personal app button is clicked in the app bar.
*/
export declare function onClick(handler: handlerFunctionType): void;
/**
* Registers a handler for entering hover of the app button.
* Only one handler can be registered at a time. A subsequent registration replaces an existing registration.
* @param handler - The handler to invoke when entering hover of the personal app button in the app bar.
*/
export declare function onHoverEnter(handler: handlerFunctionType): void;
/**
* Registers a handler for exiting hover of the app button.
* Only one handler can be registered at a time. A subsequent registration replaces an existing registration.
* @param handler - The handler to invoke when exiting hover of the personal app button in the app bar.
*/
export declare function onHoverLeave(handler: handlerFunctionType): void;
/**
* Checks if pages.appButton capability is supported by the host
* @returns boolean to represent whether the pages.appButton capability is supported
*
* @throws Error if {@linkcode app.initialize} has not successfully completed
*/
export declare function isSupported(): boolean;