pocka / storybook-addon-vue-info

Info addon for Vue components
https://storybook-addon-vue-info.netlify.com/?path=/story/examples-basic-usage--simple-example
MIT License
164 stars 28 forks source link

Apply custom style to Preview easily #93

Closed blandine closed 5 years ago

blandine commented 5 years ago

My components are styled through bootstrap-vue. However, when the storybook-addon-vue-info is added to a story, the bootstrap style is overriden by storybook-addon-vue-info. I checked if I could override the addon css classes but it seems they are calculated (.src-components-Preview-preview-30u8 for example).

I'd like to apply my custom style to the Preview component without redefining a whole custom wrapper, is it possible?

Thanks :)

pocka commented 5 years ago

@blandine

I'd like to apply my custom style to the Preview component without redefining a whole custom wrapper, is it possible?

Currently, there is no way to do this. We should add options like previewClassName or/and previewStyle because it's common use-case IMO.

// like this?
addParameters({
  info: {
    previewClassName: 'my-class-name',
    previewStyle: {
      backgroundColor: 'tomato'
    }
  }
})
pocka commented 5 years ago

previewClassName and previewStyle options added at v1.2.0