You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: guides/release/components/block-content.md
+12-12Lines changed: 12 additions & 12 deletions
Original file line number
Diff line number
Diff line change
@@ -333,16 +333,16 @@ If you want to yield content to different spots in the same component, you can u
333
333
You could also want to pass some values. This is the same process as the default `yield`, but you just have to pass `to` as the last argument. An example would be the popover:
Without named blocks, we would certainly have to pass components as `args` to the popover. But this is much more practical!
@@ -355,14 +355,14 @@ Here’s how we would call our named blocks as a consumer:
355
355
<button type="button">Click to {{if open "close" "open"}} the popover!</button>
356
356
</:trigger>
357
357
<:content>
358
-
This is what is shown when I'm opened!
358
+
This is what is shown when I'm opened!
359
359
</:content>
360
360
</Popover>
361
361
```
362
362
363
363
We know the state of the popover because we passed it as an argument to the `yield`. To access its value, use the block parameters at the named block scope. It will not be accessible at the `Popover` level, so if you want the value to be available for all the blocks, you will have to pass it for each of them.
364
364
365
-
That would give this result:
365
+
Rendering the previous code example would give this as result:
366
366
367
367
```html
368
368
<!-- rendered -->
@@ -371,7 +371,7 @@ That would give this result:
371
371
<buttontype="button">Click to close the popover!</button>
0 commit comments