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

pull/4215/head
Thomas Ferro 6 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 ```html
<!-- App.svelte --> <!-- App.svelte -->
<Widget></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>
<!-- Widget.svelte --> <!-- Widget.svelte -->
<div> <div>
<slot> <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> </slot>
</div> </div>
``` ```

Loading…
Cancel
Save