IThemeProviderProps
export interface IThemeProviderProps
Properties
Property | Modifiers | Type | Description |
|---|---|---|---|
(Optional) Analytical backend, from which the ThemeProvider will obtain selected theme object. | |||
ReactNode | (Optional) React children | ||
boolean | (Optional) Flag determining whether the complementary palette is enabled or not. | ||
(Optional) If provided it is called with loaded theme to allow its modification according to the app needs. | |||
boolean | (Optional) Should ThemeProvider remove global styles during the unmount phase? | ||
(Optional) Theme that will be used if defined. | |||
string | (Optional) Identifier of analytical workspace, from which the ThemeProvider will obtain the selected theme identifier |
Property details
IThemeProviderProps.backendproperty
Analytical backend, from which the ThemeProvider will obtain selected theme object.
backend?: IAnalyticalBackend;
Remarks
If you do not specify instance of analytical backend using this prop, then you MUST have BackendProvider up in the component tree.
IThemeProviderProps.childrenproperty
React children
children?: ReactNode;
IThemeProviderProps.enableComplementaryPaletteproperty
Flag determining whether the complementary palette is enabled or not.
enableComplementaryPalette?: boolean;
Remarks
If set to false, complementary palette is discarded. Useful for applications not yet fully supporting dark-based themes achievable with the complementary palette.
IThemeProviderProps.modifierproperty
If provided it is called with loaded theme to allow its modification according to the app needs.
modifier?: ThemeModifier;
IThemeProviderProps.removeGlobalStylesOnUnmoutproperty
Should ThemeProvider remove global styles during the unmount phase?
removeGlobalStylesOnUnmout?: boolean;
Remarks
Only applies when no other global ThemeProvider with a loaded theme remains mounted; otherwise the theme of the last registered one with a loaded theme is shown again. When a provider with this set unmounts while descendant ThemeProviders stay mounted, the global styles are removed once the last of them unmounts, whatever their own setting.
Default: true
IThemeProviderProps.themeproperty
Theme that will be used if defined.
theme?: ITheme;
Remarks
If not defined here, the theme will be obtained from the backend.
Note: either the theme or both backend and workspace MUST be provided (either directly or via their contexts).
IThemeProviderProps.workspaceproperty
Identifier of analytical workspace, from which the ThemeProvider will obtain the selected theme identifier
workspace?: string;
Remarks
If you do not specify workspace identifier, then you MUST have WorkspaceProvider up in the component tree.