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

Use callback hook for containerRef #77

Closed curdin closed 2 years ago

curdin commented 2 years ago

This ensures the Step ref is always set to allow for reading of the offsetWidth

Resolves https://github.com/jeanverster/chakra-ui-steps/issues/76

Needs review to ensure no unintended side-effects

jeanverster commented 2 years ago

Hey @curdin - sorry for only getting to this now, have been on vacation the last week or so. Code looks good - but I'm currently working on a bit of a re-write to move all this js logic to css instead.. But that's not done yet so I think this will work as a fix for the time being 👍 Thanks!