Theme selector

CSPR.click toolbar has two themes: light and dark. You can use one or the other. And if your application also has light and dark modes, you can add to the toolbar a theme selector to let the user easily change between both.

const handleThemeSwitch = () => 
      setThemeMode(themeMode === ThemeModeType.light ?
            ThemeModeType.dark : 
            ThemeModeType.light);
...            
<ClickUI
    themeMode={themeMode}
    topBarSettings={{
        onThemeSwitch:handleThemeSwitch
    }}
/>

Last updated