Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
itsjavi opened this issue Sep 5, 2023 · 0 comments
Open

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

itsjavi opened this issue Sep 5, 2023 · 0 comments
Labels
new-feature New feature or request
Milestone

Comments

@itsjavi
Copy link
Owner

itsjavi commented Sep 5, 2023

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
    },
}
  • Parameters will be merged. If stories redefine them, they will be overriden.
  • Decorators will be appended when stories define new ones. Kind of "inheritance". That's the behavior in Storybook AFAIK.
  • Render and renderFrame will be overriden when redefined in stories.

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.

@itsjavi itsjavi added the new-feature New feature or request label Sep 5, 2023
@itsjavi itsjavi added this to the v1.0.0 milestone Sep 12, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
new-feature New feature or request
Projects
Status: 📋 Backlog
Development

No branches or pull requests

1 participant