ThemeProvider()
Home > @gooddata/sdk-ui-theme-provider > ThemeProvider
ThemeProvider() function
Fetches the theme object from the backend upon mounting and passes both theme object and isThemeLoading flag to the context via ThemeContextProvider.
Signature:
export declare function ThemeProvider({ children, theme: themeParam, backend: backendParam, workspace: workspaceParam, modifier, enableComplementaryPalette, removeGlobalStylesOnUnmout, }: IThemeProviderProps): React.JSX.Element;
Parameters
Parameter | Type | Description |
---|---|---|
{ children, theme: themeParam, backend: backendParam, workspace: workspaceParam, modifier, enableComplementaryPalette, removeGlobalStylesOnUnmout, } | IThemeProviderProps |
Returns:
React.JSX.Element
Remarks
Converts properties from theme object into CSS variables and injects them into
via setCssPropertiesBoth backend and workspace can be passed as an arguments, otherwise the component tries to get these from the context