TwThemes.activateTheme({[themeName], [invertShade]}): [activeThemeName, activeInvertShade]
TwThemes.activateTheme()
activates the supplied theme, applying it's colors
within the application.
Internally, this merely sets the context-based CSS Variables to the real colors defined by the theme.
API:
+ TwThemes.activateTheme({[themeName], [invertShade]}): [activeThemeName, activeInvertShade]
Parameters (Please Note this function uses named parameters):
themeName
: {string} - the theme name to activate (as defined in theThemes
structure).DEFAULT: the currently active
themeName
.invertShade
: {boolean} - an indicator as to whether the theme's shaded colors should be inverted (true
) or not (false
) ... i.e. light-to-dark, and dark-to-light.DEFAULT: the current
invertShade
setting
Return: [activeThemeName, activeInvertShade]
- the newly activated theme state.