jeanverster / chakra-ui-steps

Steps component designed to work seamlessly with Chakra UI
https://chakra-ui-steps.vercel.app
390 stars 44 forks source link

Contents is not defined #84

Closed tiganabryan closed 1 year ago

tiganabryan commented 2 years ago

Error: Cannot find name 'Contents'

When the first example on https://jeanverster.github.io/chakra-ui-steps-site/ is rendered, there's an error saying "Contents is not defined". The component 'Contents' isn't declared, where is it being rendered from in the example?

Reproduction: https://codesandbox.io/s/still-hooks-vc25zs?file=/src/Horizontal.tsx

screenshot of error

Screenshot of interactive demo's code

screenshot of Contents component in interactive demo screenshot of first stepper on chakra-ui-steps site
jeanverster commented 2 years ago

Hey @tiganabryan sorry if the examples aren't super clear, but the <Content /> component is actually just a placeholder for whatever you would want to render inside the steps :) For example you could do something like this:

{steps.map(({ label }, index) => (
  <Step label={label} key={label}>
    <div>Step {index + 1}</div>
  </Step>
))}

I realise this is maybe a bit confusing so I think I will actually update these examples to be a bit more clear

tiganabryan commented 2 years ago

Oh ok thanks for clarifying. The stepper is really smooth and seamless, you did a great job.