efstajas / svelte-stepper

🚶 A simple library for building delightfully animated stepped flows with Svelte.
https://svelte-stepper.jason-e.dev
141 stars 4 forks source link

Question: At the component level, where is `props`? #6

Closed ogrotten closed 10 months ago

ogrotten commented 10 months ago

I have my step as

    makeStep({
        component: Page3,
        props: { ecks },
    }),

In Page3.svelte, how do I get to props.ecks?

efstajas commented 10 months ago

Hey @ogrotten, not sure I 100% get your question, but the props value is passed to the step component as its actual props. So if you want to access ecks within that step, you can just add a prop like export let ecks to your Page3 component, and the stepper will pass it there.

efstajas commented 10 months ago

Closing for now — if this didn't answer your question, please feel free to re-open!

ogrotten commented 9 months ago

ooh man lol that would . . . like . . . make sense.

Thanks.