react-theming / storybook-addon-material-ui

Addon for storybook wich wrap material-ui components into MuiThemeProvider. :page_with_curl: This helps and simplifies development of material-ui based components.
https://github.com/sm-react/storybook-addon-material-ui
MIT License
567 stars 131 forks source link

Is it possible to show properties other than primary, secondary and error? #114

Open TPOborne opened 4 years ago

TPOborne commented 4 years ago

I've added a new tertiary property to my theme like the following. Material-UI can handle this but this addon doesnt show it in the panel. It just shows primary, secondary and error.

const someTheme = {
  themeName: 'Another Theme',
  palette: {
      primary: {
        main: '#00bcd4',
        contrastText: '#E0F7FA'
      },
      secondary: {
        main: '#fdd835',
        contrastText: '#FFFFFF'
      },
     tertiary: {
        main: '#f000f0'
      }
  }
};
usulpro commented 4 years ago

Hey @TPOborne It was done just to simplify output. I assumed that users usually have only primary and secondary sections in palette. There are no objections to show other props. Feel free to send PR to enable that :smiley: