@microsoft/teamsfx-react
Version:
React helper functions for Microsoft TeamsFx
32 lines • 972 B
TypeScript
import { app } from "@microsoft/teams-js";
import { Theme } from "@fluentui/react-components";
/**
* Microsoft Teams React hook
* @param options optional options
* @returns A tuple with properties and methods
* properties:
* - inTeams: boolean = true if inside Microsoft Teams
* - fullscreen: boolean = true if in full screen mode
* - theme: Fluent UI Theme
* - themeString: string - representation of the theme (default, dark or contrast)
* - context - the Microsoft Teams JS SDK context
* methods:
* - setTheme - manually set the theme
*/
export declare function useTeams(options?: {
initialTheme?: string;
setThemeHandler?: (theme?: string) => void;
}): [
{
inTeams?: boolean;
fullScreen?: boolean;
theme: Theme;
themeString: string;
context?: app.Context;
loading?: boolean;
},
{
setTheme: (theme: string | undefined) => void;
}
];
//# sourceMappingURL=useTeams.d.ts.map