Overview of sdk-ui-theme-provider
Home > @gooddata/sdk-ui-theme-provider
sdk-ui-theme-provider package
This package provides tools to make your application support themes.
Remarks
A theme allows you to change the colors, fonts and other visual aspects of GoodData.UI components. You can use functions in this package to set a theme for a subtree of your React component tree and to make your own components able to consume the theme provided.
Functions
Function | Description |
---|---|
ThemeContextProvider({ children, theme, themeIsLoading, themeStatus, isScopeThemed, }) | Provides the theme object, themeIsLoading flag and themeStatus into context |
ThemeProvider({ children, theme: themeParam, backend: backendParam, workspace: workspaceParam, modifier, enableComplementaryPalette, removeGlobalStylesOnUnmout, }) | Fetches the theme object from the backend upon mounting and passes both theme object and isThemeLoading flag to the context via ThemeContextProvider. |
useIsDarkTheme() | Hook that returns whether the current theme is dark |
useTheme(theme) | Hook for reaching the theme from context. |
useThemeIsLoading() | Hook for reaching the themeIsLoading flag from context |
useThemeStatus() | Hook for reaching the themeStatus from context |
withTheme(Component) | Injects both theme object and isThemeLoading flag into component as properties |
Interfaces
Interface | Description |
---|---|
IThemeContextProviderProps | |
IThemeProviderProps |
Type Aliases
Type Alias | Description |
---|---|
ThemeModifier | |
ThemeStatus |