hipstersmoothie / storybook-dark-mode

A storybook addon that lets your users toggle between dark and light mode.
MIT License
435 stars 56 forks source link

Creating Option for Brand Title, Brand Image, etc #136

Closed fbtwitter closed 3 years ago

fbtwitter commented 3 years ago

I'm hoping there is an api to add additional customization for brand title, brand image theming in darkmode parameter

fbtwitter commented 3 years ago

It's actually already in it.. pardon myself,

The way to use that parameter by doing like this

nuxt.config.js / .preview.js

import { themes } from '@storybook/theming'

export parameters = {
darkMode: {
        // Override the default dark theme
        dark: {
          ...themes.dark,
          brandTitle: 'Talkie Buddy Atomic Design',
          brandUrl: 'https://talkiebuddy.com',
        },
        // Override the default light theme
        light: {
          ...themes.light,
          brandTitle: 'Talkie Buddy Atomic Design',
          brandUrl: 'https://talkiebuddy.com',
        },
      },
}