UNPKG

msteams-react-base-component

Version:

React helper components for Microsoft 365 Teams, Office and Outlook apps

31 lines (30 loc) 922 B
import { app } from "@microsoft/teams-js"; import { ThemePrepared } from "@fluentui/react-northstar"; /** * 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: ThemePrepared; themeString: string; context?: app.Context; }, { setTheme: (theme: string | undefined) => void; } ];