Doc (#4172): Fixing the unclear slot with fallback content example

pull/4215/head
Thomas Ferro 5 years ago committed by Conduitry
parent 7ff0c83191
commit fe750d2606

@ -1202,14 +1202,16 @@ The content is exposed in the child component using the `<slot>` element, which
```html
<!-- App.svelte -->
<Widget></Widget>
<Widget>
<p>this is some child content</p>
<p>this is some child content that will overwrite the default slot content</p>
</Widget>
<!-- Widget.svelte -->
<div>
<slot>
this will be rendered if someone does <Widget/>
this fallback content will be rendered when no content is provided, like in the first example
</slot>
</div>
```

Loading…
Cancel
Save