@omnia/fx
Version:
Provide Omnia Fx typings and tooling for clientside Omnia development.
39 lines (38 loc) • 1.26 kB
TypeScript
import { GuidValue } from "../../models";
import { ThemeTargetMapping, ThemeStyling, ThemeDefinition, ThemeColors } from "../../models";
export interface ITheming {
colors: ThemeColors;
body: ThemeStyling;
chrome: ThemeStyling;
}
interface ThemingModel {
id: GuidValue;
definition: ThemeTargetMapping;
body: ThemeStyling;
chrome: ThemeStyling;
colors: ThemeColors;
}
export declare class Theming implements ITheming {
private _accessibility;
constructor(themeTargetMapping?: ThemeTargetMapping, allowFallback?: boolean);
model: ThemingModel;
get definition(): ThemeTargetMapping;
get id(): GuidValue;
get targetRegistrationId(): GuidValue;
get colors(): ThemeColors;
get body(): ThemeStyling;
get chrome(): ThemeStyling;
resetInheritance(): void;
setTheming(theming: Theming): void;
setThemeTargetMapping(themeTargetMapping: ThemeTargetMapping): void;
private get themingModel();
private breakThemingInheritance;
setThemeDefinition(themingDefinition: ThemeDefinition): void;
private getThemeDefinition;
private getOmniaState;
}
export declare function useTheme(): {
theming: ITheming;
setTheming: (themingDefinition: ThemeDefinition) => void;
};
export {};