cloneTheme()
Creates a copy of this theme’s current state.
cloneTheme(): WebTheme;
Notes
- Use this to create variations of a theme without modifying the original.
Return value
A new WebTheme with the same configuration.
Examples
const baseTheme = new WebTheme().colors({ accent: "#6200EE" });
const highContrastTheme = baseTheme.cloneTheme().colors({ text: "#000000" });
Related
class WebTheme
A class that represents a complete visual theme configuration.
