Theming option tab not showing
Was the theming option removed recently? Im having the same issue as https://github.com/react-theming/storybook-addon/issues/28
My setup looks like this:
import { createTheme, ThemeProvider } from '@material-ui/core';
import { withThemes } from '@react-theming/storybook-addon';
import themes from '../src/themes';
import { red } from '@material-ui/core/colors';
export const parameters = {
actions: { argTypesRegex: "^on[A-Z].*" },
controls: {
matchers: {
color: /(background|color)$/i,
date: /Date$/,
},
},
};
// A custom theme for this app
const theme = {
palette: {
primary: {
main: '#556cd6',
},
secondary: {
main: '#19857b',
},
error: {
main: red.A400,
},
background: {
default: '#fff',
},
},
};
const providerFn = ({ theme, children }) => {
const muiTheme = createTheme(theme);
return (
<ThemeProvider theme={muiTheme}>{children}</ThemeProvider>
);
};
const themingDecorator = withThemes(null, [ themes.new, theme ], { providerFn });
export const decorators = [
themingDecorator,
];
Hey @RHeynsZa
Could you please clarify what exactly is missing in your storybook? Did you specify this addon in main.js -> addons section?
Seeing the same issue, where the theme option just doesn't show on the control panel. Strange because it was working before; no idea what changed.
Really weird. After disabling all other addons but this one and then progressively bringing them back, everything's working again.
It loooks like this issue appears with React 18 At least I fased this after updating React major version
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.