theming / Class

ThemeTokenRegistry

Decorators:@Injectable

Registry for active theme tokens in the current application.

Notes

This is an abstract service with a default implementation RootElementStylePropertiesThemeTokenRegistry.

Methods

abstract

get()

Retrieve the value of a theme token.

Presentation
abstract get(name: string): string | null;
Parameters
NameTypeDescription
name
string

the name of the theme token

Returns
string | null -

the value if registered, or null if not found

Overload #1

Retrieve the value of a theme token.

Presentation
abstract get(name: string): string | null;
Parameters
NameTypeDescription
name
string

the name of the theme token

Returns
string | null -

the value if registered, or null if not found

abstract

set()

Define a new value for a theme token. Duplicate defines overwrite the previous value.

Presentation
abstract set(name: string, value: string | null): void;
Parameters
NameTypeDescription
name
string

the name of the theme token

value
string | null

new value for the theme token

Returns
void
Overload #1

Define a new value for a theme token. Duplicate defines overwrite the previous value.

Presentation
abstract set(name: string, value: string | null): void;
Parameters
NameTypeDescription
name
string

the name of the theme token

value
string | null

new value for the theme token

Returns
void