Skip to content

Commit

Permalink
docs: format Svelte 5 notes
Browse files Browse the repository at this point in the history
  • Loading branch information
theetrain committed Sep 6, 2024
1 parent 9760894 commit 27ac8e9
Showing 1 changed file with 16 additions and 3 deletions.
19 changes: 16 additions & 3 deletions README-svelte-5.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,9 +19,22 @@
import { CartesianWithRunes as Cartesian } from "svelte-cartesian"
</script>

{#snippet children()} Click me {/snippet} <Cartesian Component={Button}
props={{ variant: ['primary', 'secondary'], size: ['medium', 'large'],
children: [children] }} />
<!-- define snippet possibilities -->
{#snippet children()}
Click me
{/snippet}

<!--
Pass in prop and Snippet possibilities as an array of values.
-->
<Cartesian
Component={Button}
props={{
variant: ['primary', 'secondary'],
size: ['medium', 'large'],
children: [children]
}}
/>
```

3. Pass props with array of potential values, including an explicit `undefined`
Expand Down

0 comments on commit 27ac8e9

Please sign in to comment.