Skip to content

Commit

Permalink
fix: incorrect usage of <slot> in accordion samples (#273)
Browse files Browse the repository at this point in the history
  • Loading branch information
divdavem authored Dec 1, 2023
1 parent eba66fb commit 430f3bb
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 14 deletions.
12 changes: 6 additions & 6 deletions svelte/demo/samples/accordion/Default.route.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -5,15 +5,15 @@

<Accordion>
<AccordionItem itemVisible={true}>
<slot slot="itemHeader">Simple</slot>
<slot slot="itemBody">{BODY}</slot>
<svelte:fragment slot="itemHeader">Simple</svelte:fragment>
<svelte:fragment slot="itemBody">{BODY}</svelte:fragment>
</AccordionItem>
<AccordionItem>
<slot slot="itemHeader"><span>&#9733; <b>Fancy</b> title &#9733;</span></slot>
<slot slot="itemBody">{BODY}</slot>
<svelte:fragment slot="itemHeader"><span>&#9733; <b>Fancy</b> title &#9733;</span></svelte:fragment>
<svelte:fragment slot="itemBody">{BODY}</svelte:fragment>
</AccordionItem>
<AccordionItem itemDisabled={true}>
<slot slot="itemHeader">Disabled</slot>
<slot slot="itemBody">{BODY}</slot>
<svelte:fragment slot="itemHeader">Disabled</svelte:fragment>
<svelte:fragment slot="itemBody">{BODY}</svelte:fragment>
</AccordionItem>
</Accordion>
8 changes: 4 additions & 4 deletions svelte/demo/samples/accordion/Playground.route.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -8,12 +8,12 @@
{#key $props$}
<Accordion {...$props$}>
<AccordionItem>
<slot slot="itemHeader">Header 1</slot>
<slot slot="itemBody">Body 1</slot>
<svelte:fragment slot="itemHeader">Header 1</svelte:fragment>
<svelte:fragment slot="itemBody">Body 1</svelte:fragment>
</AccordionItem>
<AccordionItem>
<slot slot="itemHeader">Header 2</slot>
<slot slot="itemBody">Body 2</slot>
<svelte:fragment slot="itemHeader">Header 2</svelte:fragment>
<svelte:fragment slot="itemBody">Body 2</svelte:fragment>
</AccordionItem>
</Accordion>
{/key}
8 changes: 4 additions & 4 deletions svelte/demo/samples/accordion/TogglePanels.route.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -10,12 +10,12 @@

<Accordion bind:this={accordion}>
<AccordionItem itemId="first">
<slot slot="itemHeader">First panel</slot>
<slot slot="itemBody">{BODY}</slot>
<svelte:fragment slot="itemHeader">First panel</svelte:fragment>
<svelte:fragment slot="itemBody">{BODY}</svelte:fragment>
</AccordionItem>
<AccordionItem itemId="second" bind:this={secondAccordionItem}>
<slot slot="itemHeader">Second panel</slot>
<slot slot="itemBody">{BODY}</slot>
<svelte:fragment slot="itemHeader">Second panel</svelte:fragment>
<svelte:fragment slot="itemBody">{BODY}</svelte:fragment>
</AccordionItem>
</Accordion>
<hr />
Expand Down

0 comments on commit 430f3bb

Please sign in to comment.