provideTheme
Make providers that consume the given list of theme token generation specifications by generating and applying the latest theme tokens as specified.
See Also
Presentation
function provideTheme (
compositions: Observable <ThemeBuilderComposition >[],
): EnvironmentProviders ;
Returns
Parameters
Name | Type | Description |
---|---|---|
compositions |
| list of theme token generation specifications |
Example usage
providers: [
provideTheme (
withThemeBuilder ("typography", TypographyBuilder, {
font: "OpenSans"
}),
withThemeBuilder (
'color',
ColorBuilder,
defer ((schemeObserver = inject (PreferredColorSchemeObserver)) =>
schemeObserver
.observe()
.pipe (map ((isDark) => ({ primaryColor: PRIMARY_COLOR, dark: isDark }))),
),
),
),
],