diff --git a/documentation/docs/99-legacy/20-legacy-slots.md b/documentation/docs/99-legacy/20-legacy-slots.md index 5189f2017db8..3474782e93ae 100644 --- a/documentation/docs/99-legacy/20-legacy-slots.md +++ b/documentation/docs/99-legacy/20-legacy-slots.md @@ -74,39 +74,45 @@ If no slotted content is provided, a component can define fallback content by pu Slots can be rendered zero or more times and can pass values _back_ to the parent using props. The parent exposes the values to the slot template using the `let:` directive. -The usual shorthand rules apply — `let:item` is equivalent to `let:item={item}`, and `` is equivalent to ``. - ```svelte - + +``` - - -
{thing.text}
+```svelte + + + +
{processed.text}
``` +The usual shorthand rules apply — `let:item` is equivalent to `let:item={item}`, and `` is equivalent to ``. + Named slots can also expose values. The `let:` directive goes on the element with the `slot` attribute. ```svelte - +
    {#each items as item}
  • - +
  • {/each}
+``` - +```svelte +
{item.text}

Copyright (c) 2019 Svelte Industries