Storybook: Storybook Theming

Created on 18 Aug 2020  路  5Comments  路  Source: nuxt-community/storybook

Is your feature request related to a problem? Please describe.

Theming storybook

Describe the solution you'd like

Add manager.js for theming

Describe alternatives you've considered

N/A

Additional context

N/A

enhancement

Most helpful comment

Though would be glad to be able to add theming options in nuxt.config.js

storybook: {
  theme: {
    // themeConfig here
  }
}

All 5 comments

You should eject storybook config using manual setup

Resolved by doing the manual setup and adding manager.js in folder storybook have to fix and setup webpack to resolve some issues though. Below is a sample theming inside manager.js

import { addons } from '@storybook/addons';
import { create } from '@storybook/theming';
import Logo from '../static/icon.png'

const themeConfig = create({
  base: 'dark',
  brandTitle: 'Name',
  brandImage: Logo,
  appBg: '#242424',
  appContentBg: '#333333',
  textColor: '#ffcf00',
  barSelectedColor: '#ffcf00',
});

addons.setConfig({
  theme: themeConfig,
});

Though would be glad to be able to add theming options in nuxt.config.js

storybook: {
  theme: {
    // themeConfig here
  }
}

Though would be glad to be able to add theming options in nuxt.config.js

storybook: {
  theme: {
    // themeConfig here
  }
}

I also would love this option without having to eject/manual setup

Dark mode is also possible with the storybook-dark-mode package.

After installing you can add it to nuxt.config.js like so:

storybook: {
  addons: [
    'storybook-dark-mode/register'
  ],
}
Was this page helpful?
0 / 5 - 0 ratings

Related issues

dChiamp picture dChiamp  路  3Comments

Elaniobro picture Elaniobro  路  3Comments

altryne picture altryne  路  3Comments

homerjam picture homerjam  路  3Comments

seancolsen picture seancolsen  路  4Comments