Open cristiantiradob opened 6 months ago
The latest updates on your projects. Learn more about Vercel for Git ↗︎
Name | Status | Preview | Comments | Updated (UTC) |
---|---|---|---|---|
flowbite-react | ✅ Ready (Inspect) | Visit Preview | 💬 Add feedback | Jan 4, 2024 10:25pm |
All modified and coverable lines are covered by tests :white_check_mark:
Comparison is base (
7461173
) 99.54% compared to head (70f7db3
) 97.36%. Report is 184 commits behind head on main.
:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.
Hi. I'm not one of the maintainer of this repository but thanks for implementing this very useful update. I went over the PR and It LGTM. Only a minor comment for :
navigateTo(validateActiveSlide)();
In the case of an invalid index, I prefer keeping the current active item as it makes debugging issues easier.
Added 'activeSlide' prop with tests and docs. I considered the following facts:
Validate 'activeSlide' prop: If negative value, default slider item is set to '0'. If value is greater than carousel childs, default slider item is set to the last one. If no carousel childs, exit useEffect.
Default value: If no 'activeSlide' prop provided, default value is set to 0.
Update 'activeItem' State 'activeItem' is set to 'activeSlide' when the component mounts.
Fixes #1094