|
|
|
@ -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>
|
|
|
|
|