-
-
Notifications
You must be signed in to change notification settings - Fork 9.4k
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
Conversation
There was a problem hiding this 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] }; |
There was a problem hiding this comment.
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'; |
There was a problem hiding this comment.
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 }, |
There was a problem hiding this comment.
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>], | ||
} |
There was a problem hiding this comment.
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.
Part of #20950
Note, only updates existing docs snippets. Somebody still needs to add TS snippets as followup.