UNPKG

1.23 kBTypeScriptView Raw
1import { ITheme, IPartialTheme } from '../interfaces/index';
2export { createTheme } from '@fluentui/theme/lib-commonjs/createTheme';
3export declare const ThemeSettingName = "theme";
4export declare function initializeThemeInCustomizations(): void;
5/**
6 * Gets the theme object
7 * @param depComments - Whether to include deprecated tags as comments for deprecated slots.
8 */
9export declare function getTheme(depComments?: boolean): ITheme;
10/**
11 * Registers a callback that gets called whenever the theme changes.
12 * This should only be used when the component cannot automatically get theme changes through its state.
13 * This will not register duplicate callbacks.
14 */
15export declare function registerOnThemeChangeCallback(callback: (theme: ITheme) => void): void;
16/**
17 * See registerOnThemeChangeCallback().
18 * Removes previously registered callbacks.
19 */
20export declare function removeOnThemeChangeCallback(callback: (theme: ITheme) => void): void;
21/**
22 * Applies the theme, while filling in missing slots.
23 * @param theme - Partial theme object.
24 * @param depComments - Whether to include deprecated tags as comments for deprecated slots.
25 */
26export declare function loadTheme(theme: IPartialTheme, depComments?: boolean): ITheme;