themesberg / flowbite-react

Official React components built for Flowbite and Tailwind CSS
https://flowbite-react.com
MIT License
1.78k stars 396 forks source link

fix(storybook): fix the `argTypes.weekStart.mapping` on `Datepicker.stories.tsx` #1254

Closed ktanoooo closed 5 months ago

ktanoooo commented 5 months ago

When you click Datepicker on the storybook, throws an invalid time value error. I guess it is because the default value of weekStart arg becomes string Sunday by the argTypes.weekStart.mapping. The weekStart arg is expected the number. This PR fixed the value of argTypes.weekStart.mapping to be only the string key.

- argTypes.weekStart.mapping: { 0: "Sunday", 1: "Monday", 2: "Tuesday", 3: "Wednesday", 4: "Thursday", 5: "Friday", 6: "Saturday", Sunday: 0, Monday: 1, Tuesday: 2, Wednesday: 3, Thursday: 4, Friday: 5, Saturday: 6 }
+ argTypes.weekStart.mapping: { Sunday: 0, Monday: 1, Tuesday: 2, Wednesday: 3, Thursday: 4, Friday: 5, Saturday: 6 }

fix #1167

vercel[bot] commented 5 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 30, 2024 5:51pm
codecov[bot] commented 5 months ago

Codecov Report

All modified and coverable lines are covered by tests :white_check_mark:

Comparison is base (7461173) 99.54% compared to head (7bf4f8a) 97.38%. Report is 192 commits behind head on main.

Additional details and impacted files ```diff @@ Coverage Diff @@ ## main #1254 +/- ## ========================================== - Coverage 99.54% 97.38% -2.17% ========================================== Files 163 216 +53 Lines 6621 9217 +2596 Branches 401 538 +137 ========================================== + Hits 6591 8976 +2385 - Misses 30 241 +211 ```

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.