gilbarbara / react-joyride

Create guided tours in your apps
https://react-joyride.com/
MIT License
6.8k stars 525 forks source link

steps field is giving error in react-joyride #910

Closed Sahani18 closed 1 year ago

Sahani18 commented 1 year ago

The expected type comes from property 'steps' which is declared here on type 'IntrinsicAttributes & IntrinsicClassAttributes & Readonly & Readonly<{ children?: ReactNode; }>'

gilbarbara commented 1 year ago

Hey @Sahani18

Issues without a reproduction link are likely to stall.

Can you provide a codesandbox with an example?

Sahani18 commented 1 year ago

https://codeshare.io/YLQeYE

There is a red swigly line under steps but things are working properly. I'm afraid it may break in production

Sahani18 commented 1 year ago

image

gilbarbara commented 1 year ago

You are using top-left as a placement for a step, but that's not valid. Check the docs for the available options

Sahani18 commented 1 year ago

Fixed that but still same issue

Screenshot (238)
gilbarbara commented 1 year ago

You need to type your steps... Import the Step from this package, and set your step variable.

const step: Array<Step> = ...

Anyway, this was never a problem with the library. but misconfigured TS code. Closing it.