SHO-ai-org / addon-stitches

Storybook addon that allow the application of
MIT License
4 stars 1 forks source link

Change background color to black when theme set to dark #9

Open HasanHaghniya opened 1 year ago

HasanHaghniya commented 1 year ago
import { Preview } from "@storybook/react"
import { darkTheme, lightTheme } from "./../src/stitches/stitches.config"
import { ThemesParameter } from "multiple-themes-stitches"

const multipleThemesStitches: ThemesParameter = {
  values: [
    {
      name: "Light",
      theme: lightTheme,
    },
    {
      name: "Dark",
      theme: darkTheme,
    },
  ],
  default: "Light",
}

const preview: Preview = {
  parameters: {
    multipleThemesStitches,
    actions: { argTypesRegex: "^on[A-Z].*" },
    controls: {
      matchers: {
        color: /(background|color)$/i,
        date: /Date$/,
      },
    },
    designToken: {
      disable: true,
      showSearch: false,
    },
  },

  decorators: [],
}

export default preview

this is my preview file config , but when i set theme to dark , i wanna change background color to black or #222

thanks

HasanHaghniya commented 1 year ago

when we change theme , the background color applied by storybook and layout "centered", will disabled, the problem is with this package , it also does not work on v6.5 and 7.1

mathisobadia commented 1 year ago

@SecretKeeper hello, I'm not sure that I understand what the issue is, can you maybe post a screenshot of what you see vs what you expect to see ?