File tree 1 file changed +5
-5
lines changed
1 file changed +5
-5
lines changed Original file line number Diff line number Diff line change @@ -1249,15 +1249,15 @@ The usual shorthand rules apply — `let:item` is equivalent to `let:item={item}
1249
1249
1250
1250
``` html
1251
1251
<!-- App.svelte -->
1252
- <FancyList {items} let:item = {item } >
1253
- <div >{item .text}</div >
1252
+ <FancyList {items} let:prop = {thing } >
1253
+ <div >{thing .text}</div >
1254
1254
</FancyList >
1255
1255
1256
1256
<!-- FancyList.svelte -->
1257
1257
<ul >
1258
1258
{#each items as item}
1259
1259
<li class =" fancy" >
1260
- <slot item ={item} ></slot >
1260
+ <slot prop ={item} ></slot >
1261
1261
</li >
1262
1262
{/each}
1263
1263
</ul >
@@ -1270,15 +1270,15 @@ Named slots can also expose values. The `let:` directive goes on the element wit
1270
1270
``` html
1271
1271
<!-- App.svelte -->
1272
1272
<FancyList {items} >
1273
- <div slot =" item" let:item = {item} >{item.text}</div >
1273
+ <div slot =" item" let:item >{item.text}</div >
1274
1274
<p slot =" footer" >Copyright (c) 2019 Svelte Industries</p >
1275
1275
</FancyList >
1276
1276
1277
1277
<!-- FancyList.svelte -->
1278
1278
<ul >
1279
1279
{#each items as item}
1280
1280
<li class =" fancy" >
1281
- <slot name =" item" item = {item} ></slot >
1281
+ <slot name =" item" {item} ></slot >
1282
1282
</li >
1283
1283
{/each}
1284
1284
</ul >
You can’t perform that action at this time.
0 commit comments