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

Documentation: Update preview.js snippets to default export #21258

Merged
merged 3 commits into from
Feb 27, 2023

Conversation

shilman
Copy link
Member

@shilman shilman commented Feb 25, 2023

Part of #20950

Note, only updates existing docs snippets. Somebody still needs to add TS snippets as followup.

Copy link
Contributor

@jonniebigodes jonniebigodes left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@shilman left a couple of small items that need to be addressed, and this should be good to go. Thanks for taking the time to make this pull request. Appreciate it 🙏

Also, I'll take care of the TypeScript snippets on a follow up pull request.

},
},
};

// Provide the MSW addon decorator globally
export const decorators = [mswDecorator];
export default { decorators: [mswDecorator] };
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@shilman when you're able can you move this decorator to the export default above so that it aligns it the rest of the snippets that mention them to avoid misleading folks? Please feel free to correct me if I'm wrong on this.

@@ -1,21 +1,24 @@
```js
// .storybook/preview.js

import { Preview } from '@storybook/addon-docs/angular';
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@shilman feel free to correct me but shouldn't this import be coming directly from the @storybook/angular package instead of @storybook/addon-docs?

@@ -1,5 +1,7 @@
```js
// .storybook/preview.js

export const parameter = { passArgsFirst : false }.
export default {
parameters: { passArgsFirst : false },
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Seems there's an extra space here as well, should be parameters: { passArgsFirst: false },

export const decorators = [(Story) => <div style={{ margin: '3em' }}>{Story()}</div>];
export default {
decorators: [(Story) => <div style={{ margin: '3em' }}>{Story()}</div>],
}
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Seems like there's a missing ; here.

@shilman shilman merged commit 962d74c into next Feb 27, 2023
@shilman shilman deleted the shilman/preview-default-export-docs branch February 27, 2023 14:48
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants