themesberg / flowbite-react

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

fix(button & dropdownitem): reverts return type of Button & DropdownItem to JSX.Element #1297

Closed rnicholus closed 3 months ago

rnicholus commented 3 months ago

In #1244, the return type of Button and DropdownItem was changed to ReactNode. This is not an acceptable return type for functional components. The correct return type is JSX.Element. This change fixes the regression from that PR (introduced in v0.7.3. Also fixes #962.

stackblitz[bot] commented 3 months ago

Review PR in StackBlitz Codeflow Run & review this pull request in StackBlitz Codeflow.

vercel[bot] commented 3 months ago

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
flowbite-react ❌ Failed (Inspect) Mar 14, 2024 1:08am
codecov[bot] commented 3 months ago

Codecov Report

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

Project coverage is 95.51%. Comparing base (7461173) to head (f6fa786). Report is 201 commits behind head on main.

Additional details and impacted files ```diff @@ Coverage Diff @@ ## main #1297 +/- ## ========================================== - Coverage 99.54% 95.51% -4.03% ========================================== Files 163 218 +55 Lines 6621 9641 +3020 Branches 401 554 +153 ========================================== + Hits 6591 9209 +2618 - Misses 30 432 +402 ```

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

rnicholus commented 3 months ago

it seems there are a number of changes built on top of the issues introduced in #1244. fixing this is going to be non-trivial