Update site/content/docs/03-template-syntax.md

Co-authored-by: gtmnayan <50981692+gtm-nayan@users.noreply.github.com>
pull/8495/head
James Scott-Brown 3 years ago committed by GitHub
parent d1b779f9c7
commit c360a6fe75
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -1617,8 +1617,12 @@ The usual shorthand rules apply — `let:item` is equivalent to `let:item={item}
</ul> </ul>
<!-- App.svelte --> <!-- App.svelte -->
<!-- the `let:itemData={thing}` directive makes the value that `FancyList` passes as the `itemData` prop <!-- `itemData` can now be used in the content you pass into the slot using `let:itemData` -->
available to the slot template as a variable called `thing` --> <FancyList {items} let:itemData>
<div>{itemData.text}</div>
</FancyList>
<!-- You can also rename it using the `let:itemData={thing}` syntax. -->
<FancyList {items} let:itemData={thing}> <FancyList {items} let:itemData={thing}>
<div>{thing.text}</div> <div>{thing.text}</div>
</FancyList> </FancyList>

Loading…
Cancel
Save