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

Skip not applied to Storybook Docs story source #145

Open
alexgirard opened this issue Apr 6, 2021 · 0 comments
Open

Skip not applied to Storybook Docs story source #145

alexgirard opened this issue Apr 6, 2021 · 0 comments
Labels

Comments

@alexgirard
Copy link

Description

The skip parameter is being applied to the addon panel, but not to the docs story source when utilizing @storybook/addon-docs, storybook-addon-jsx and jsxDecorator.

Expected behavior

When utilizing @storybook/addon-docs & storybook-addon-jsx, the jsxDecorator should apply the skip parameter to the docs story source.

Environment

  • Node.js version: v14
  • yarn version: v1.17
  • react: v16.11.0
  • storybook/react: v6.1.20
  • storybook-addon-jsx: v7.3.6
  • storybook/addon-docs: v6.1.20

Examples

preview.js

import { jsxDecorator } from 'storybook-addon-jsx';
export const decorators = [jsxDecorator];

MyComponent.stories.jsx

export const Default = args => (
    <div style={{ backgroundColor: enterpriseDark.defaultBackgroundColor }}>
        <MyComponent {...args} />
    </div>
);
Default.storyName = 'Default example';

export default {
    title: 'MyComponent',
    component: MyComponent,
    parameters: { jsx: { skip: 1, displayName: () => 'MyComponent' } },
};

Expected

<MyComponent
    test={100}
/>

Actual

<MyComponent
    <MyComponent
        test={100}
     />
/>
@alexgirard alexgirard added the bug label Apr 6, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant