minor edits

pull/8495/head
James Scott-Brown 3 years ago committed by GitHub
parent 3e866573e8
commit dd5d96c07f
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -1602,7 +1602,7 @@ Note that explicitly passing in an empty named slot will add that slot's name to
Slots can be rendered zero or more times.
The `let:` directive gives a slot template access to variables defined in the component that uses them.
The `let:` directive gives a slot template access to variables defined in the component that they are provided to.
The usual shorthand rules apply — `let:item` is equivalent to `let:item={item}`, and `<slot {item}>` is equivalent to `<slot item={item}>`.
```sv
@ -1618,7 +1618,7 @@ The usual shorthand rules apply — `let:item` is equivalent to `let:item={item}
<!-- App.svelte -->
<!-- the `let:itemData={thing}` directive makes the value that `FancyList` pases as the `itemData` prop
available to the slot template as the `thing` variable -->
available to the slot template as a variable called `thing` -->
<FancyList {items} let:itemData={thing}>
<div>{thing.text}</div>
</FancyList>

Loading…
Cancel
Save