react-bootstrap-theme-switcher
react-bootstrap-theme-switcher copied to clipboard
themePath is not flexible
trafficstars
I followed README like this.
render(
<Provider store={store}>
<ThemeSwitcher themePath="/themes" defaultTheme="yeti">
<Router history={history} routes={routes} />
</ThemeSwitcher>
</Provider>, document.getElementById('app')
);
Then it worked with using web server.
But it doesn't work when I use file protocol by doing double click html file.
It's not common usage, but it happened to me in GitHub Pages.
If I change the themePath into theme or ./theme, it works.
theme didn't work in a sub directory.