-
-
Notifications
You must be signed in to change notification settings - Fork 9.8k
React: Fix undefined type of meta.input.play in CSF factories #33346
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
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -384,3 +384,20 @@ describe('Composed getters', () => { | |
| expect(renderSpy).toHaveBeenCalled(); | ||
| }); | ||
| }); | ||
|
|
||
| it('meta.input also contains play', () => { | ||
| const meta = preview.meta({ | ||
| /** Title, component, etc... */ | ||
| play: async ({ canvas }) => { | ||
| /** Do some common interactions */ | ||
| }, | ||
| }); | ||
|
|
||
| const ExtendedInteractionsStory = meta.story({ | ||
| play: async ({ canvas, ...rest }) => { | ||
| await meta.input.play?.({ canvas, ...rest }); | ||
|
|
||
| /** Do some extra interactions */ | ||
| }, | ||
| }); | ||
| }); | ||
|
Comment on lines
+388
to
+403
|
||
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.
Unused variable ExtendedInteractionsStory.