SHO-ai-org / addon-stitches

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

Feature: Set default value #7

Closed roeb closed 1 year ago

roeb commented 1 year ago

Hello, I am very satisfied with your plugin.

Unfortunately I miss the possibility to set a default value for a theme and that this is then also adopted.

// preview.tsx

export const parameters = {
    multipleThemesStitches: {
        default: "light",
        values: [
           {
                name: "light",
                theme: lightTheme,
            },,
            {
                name: "dark",
                theme: darkTheme,
            },
        ],
    },
};

Is it still planned to implement this or can I put a PR directly?

Thanks Robert

mathisobadia commented 1 year ago

Hello Robert !

I was thinking about this feature too so I just release a new version that adds this functionality. It's version 1.0.2 but FYI I've only tested it with version 7 of storybook (now in Release candidate state but I think should be officially released soon) so I'm not 100 sure it's compatible with version 6 of storybook.

Let me know if you can test it !

roeb commented 1 year ago

Wow that was fast! I'm using Storybook v7 and will report back once I've tested it.

Thanks a lot!