Update docs/writing-stories/play-function.md

Co-authored-by: Kyle Gach <kyle.gach@gmail.com>
This commit is contained in:
jonniebigodes 2021-10-06 19:23:10 +01:00 committed by GitHub
parent c6f43431e1
commit 9ae90281ba
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -168,7 +168,7 @@ If you need, you can also adjust your `play` function to find elements based on
## Working with the Canvas
With each interaction you write inside your `play` function when Storybook executes it, it starts from the top-level element of the Canvas, acceptable for smaller components (e.g., buttons, checkboxes, text inputs). For complex components (e.g., forms, pages), we recommend that you adjust your stories and start from the component's root, for example:
By default, each interaction you write inside your `play` function will be executed starting from the top-level element of the Canvas. This is acceptable for smaller components (e.g., buttons, checkboxes, text inputs), but can be inefficient for complex components (e.g., forms, pages). To accommodate this, you can adjust your interactions to start execution from the component's root. For example:
<!-- prettier-ignore-start -->