Closed oscles closed 9 months ago
It seems like the string
type was wrong in the first place.
This needs fixing, thanks for reporting it! 🔥
Also, u can create ur own dark theme component using the exposed useThemeMode()
function, which DarkThemeToggle
component uses under the hood.
Did they release a new version of the library to fix the bug?
V0.7.0 is coming soon, containing this fix as well.
Summary
It would be nice if the DarkThemeToggle component could receive custom icon components and not just a string for the icon since when using typescript the linter throws an error because the props don't satisfy the interface.
Solution
A possible solution could be the following:![image](https://github.com/themesberg/flowbite-react/assets/32989503/9265015c-f492-4f0e-9134-741658a30c4a)