itsjavi / storylite

[Experimental] Lightweight alternative to StoryBook for React, built on top of Vite⚡️, compatible with CSF 3.0
http://itsjavi.com/storylite/
MIT License
112 stars 0 forks source link

[feat]: add global story options (decorators, etc) #48

Open itsjavi opened 1 year ago

itsjavi commented 1 year ago

Description

It would be nice to be able to specify global story options from the top-level configuration.

Desired Behaviour

To be able to configure the following, from the StoryLite app:

const appOptions = {
 // ...
  storyOptions: {
        parameters: [
            // ...
        ],
        decorators: [
            // ...
        ],
        render: [
            // ...
        ],
        renderFrame: 'root', // or 'iframe',
        // ... etc
    },
}

Considered Alternatives

The user will have otherwise to keep a file with all common options and merge them on every story. That's a lot of boilerplate code.