Skip to content

Commit

Permalink
Apply suggestions from code review
Browse files Browse the repository at this point in the history
  • Loading branch information
Rich-Harris authored Dec 12, 2024
1 parent 302f694 commit 8daf0a4
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions documentation/docs/03-template-syntax/06-snippet.md
Original file line number Diff line number Diff line change
Expand Up @@ -112,7 +112,7 @@ Snippets can reference themselves and each other ([demo](/playground/untitled#H4

## Passing snippets to components

Within the template, snippets are values just like any other. As such, they can be passed to components as props ([demo](/playground/untitled#H4sIAAAAAAAAE3VSwW7bMAz9FUIZkGRz47RAL6pqbP-wnZodZEuJhSmSKrHrAkH_Pki2kzptdePj4yOpx0gMP0pCyS-DCrUUpCJ7pWUg9CkSPLmcywCpJuYP5zbhr9SYsZYH-RHeWYPSYCCUsNB55bDZmR2qo7Me4SdvtYS9t0dYbuoSjaXLh53JxM6agLD3LwoDPMJTxnYYIfeisOTOaRmWFTzjicJ9Bc6rTlK4g1RdUVtuuOFn7u32TL59T-566b26KN9d2NvNPaRM__2wM6y-LGXiIhjlnEToJRfSr9aFx7BvygKsxr6ZkGc8zeKiPkPQItcjEutROs0befu6ElMb0USxyQskVqNo3oDPeHqHlYYfMeErXGXn3dngmuDIH-PgTII4rJwgevuaoG5IRVD-Q0LRv8hUfXJDby2fX9FV5pM70hIhllGq8dOr_CeQ4BG-OG9dWK2vbWKYpUt5XKj9WJeGC2CYw2YIcuib-N1LI6S_uMpq9CMl-zMVxFrt03C2DFsrTiMnLiTv-jIl8AAifag-WvlGO9a5bjC3ngRZfR7fsICncZMCQhwK88ffcK0OhoKWe3wY4NZ6If1NcLxT5kBhW_Bx4qIP6KnB_qbrlRarO_Ptdj1ptrz7c_D2xQgKCynlqNlZbT2Fxba8mWCZiB60bbleYb-u4AoSZ3HHhRhG2tzL46TC6mG_-Sn9Tv8BRREGv6wEAAA=)):
Within the template, snippets are values just like any other. As such, they can be passed to components as props ([demo](/playground/untitled#H4sIAAAAAAAAE3VS247aMBD9lZGpBGwDASRegonaPvQL2qdlH5zYEKvBNvbQLbL875VzAcKyj3PmzJnLGU8UOwqSkd8KJdaCk4TsZS0cyV49wYuJuQiQpGd-N2bu_ooaI1YwJ57hpVYoFDqSEepKKw3mO7VDeTTaIvxiRS1gb_URxvO0ibrS8WanIrHUyiHs7Vmigy28RmyHHmKvDMbMmFq4cQInvGSwTsBYWYoMVhCSB2rBFFPsyl0uruTlR3JZCWvlTXl1Yy_mawiR_rbZKZrellJ-5JQ0RiBUgnFhJ9OGR7HKmwVoilXeIye8DOJGfYCgRlZ3iE876TBsZPX7hPdteO75PC4QaIo8vwNPePmANQ2fMeEFHrLD7rR1jTNkW986E8C3KwfwVr8HSHOSEBT_kGRozyIkn_zQveXDL3rIfPJHtUDwzShJd_Qk3gQCbOGLsdq4yfTRJopRuin3I7nv6kL7ARRjmLdBDG3uv1mhuLA3V2mKtqNEf_oCn8p9aN-WYqH5peP4kWBl1UwJzAEPT9U7K--0fRrrWnPTXpCm1_EVdXjpNmlA8G1hPPyM1fKgMqjFHjctXGjLhZ05w0qpDhksGrybuNEHtJnCalZWsuaTlfq6nPaaBSv_HKw-K57BjzOiVj9ZKQYKzQjZodYFqydYTRN4gPhVzTDO2xnma3HsVWjaLjT8nbfwHy7Q5f2dBAAA)):

```svelte
<script>
Expand Down Expand Up @@ -144,7 +144,7 @@ Within the template, snippets are values just like any other. As such, they can

Think about it like passing content instead of data to a component. The concept is similar to slots in web components.

As an authoring convenience, snippets declared directly _inside_ a component implicitly become props _on_ the component ([demo](/playground/untitled#H4sIAAAAAAAAE3VS0W7bMAz8FUIZkGRz47RAX1TV2P5he2r6IFtMLEyRVIndFgj-98GyEydp6jefjsc7kolZuUfG2S9LmgwqVrCtNhgZf0mMDr5_6wFWHJk_vF_FP2iox2oZ8RbeOEtoKTLORGyC9lRt7Ib03rtA8FPWBmEb3B7mqzL_jaXzp43tiY2zkWAb3jVFeIaXHttQgr4Xh7n03mCcF_BGBw6PBfigG-TwAF1xRa2llVaeuPfrE_n-I7lpMQQ9KT9M7PXqEbqe_vq0saKcQlkxxFGS5HMaLHc5bZpFq71HghalwrBYdkM_QW2ViaKktpqwNzpcIbn5FUaOpDlhqRybDNoXbYP7u1BTU1UlteqTdqIkVV3Ab3S4geb2t9nwFT68n3sRw14rVjDCf8Q4hXfsik-O6vwGLs_q6uWTwzJIkPIKinHYRZ8eOniGLz44HxfLD3ujbHAYmd6OddOKUB5T97-hSt8DWoVh2qYoKRwHU04FqdTbbrhjQbVTh5GTZiibNrsEGUF1N9XHpZ1pp7Kvy2xRHgVFebJvRaTDmCSDkIbCfvB30uid5WBwS08DXLugMNxFLxttdxzWGR8dZ32gwC21d02rjVo82G_3y6NmLZvfu-DereIwQ8RRs3HGBQ6zdf4uBLMjvjOulmZB7bKAK0idxL1UarC0esT9UUWUQ77LU3rt_gO8N5UYvQQAAA==)):
As an authoring convenience, snippets declared directly _inside_ a component implicitly become props _on_ the component ([demo](/playground/untitled#H4sIAAAAAAAAE3VSTa_aMBD8Kyu_SkAbCA-JSzBR20N_QXt6vIMTO8SqsY29tI2s_PcqTiB8vaPHs7MzuxuIZgdBMvJLo0QlOElIJZXwJHsLBBvb_XUASc7Mb9Yu_B-hsMMK5sUzvDQahUZPMkJ96aTFfKd3KA_WOISfrFACKmcOMFmk8TWUTjY73RFLoz1C5U4SPWzhrcN2GKDrlcGEWauEnyRwxCaDdQLWyVJksII2uaMWTDPNLtzX5YX8-kgua-GcHJVXI3u5WEPb0d83O03TMZSmfRzOkG1Db7mNacOL19JagVALxoWbztq-H8U6j0SaYp2P2BGbOyQ2v8PQIFMXLKRDk177pq0zf6d8bMrzwBdd0pamyPMb-IjNEzS2f86Gz_Dwf-2F9nvNSUJQ_EOSoTuJNvngqK5v4Pas7n4-OCwlEEJcQTIMO-nSQwtb-GSdsX46e9gbRoP9yGQ11I0rEuycunu6PHx1QnPhxm3SFN15MOlYEFJZtf0dUywMbwZOeBGsrKNLYB54-1R9WNqVdki7usim6VmQphf7mnpshiQRhNAXdoOfMyX3OgMlKtz0cGEcF27uLSul3mewjPjgOOoDukxjPS9rqfh0pb-8zs6aBSt_7505aZ7B9xOi0T9YKW4UooVsr0zB1BTrWQJ3EL-oWcZ572GxFoezCk37QLe3897-B2i2U62uBAAA)):

```svelte
<!-- this is semantically the same as the above -->
Expand Down

0 comments on commit 8daf0a4

Please sign in to comment.