Skip to content

Commit f177323

Browse files
committed
Fixed switch theme not showing on mobile
1 parent bf30cc7 commit f177323

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

packages/nextjs/components/SwitchTheme.tsx

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,9 +22,10 @@ export const SwitchTheme = ({ className }: { className?: string }) => {
2222

2323
return (
2424
<div
25-
className={`flex space-x-2 h-8 items-center hover:bg-[#C9D8E5] dark:hover:bg-[#193048] justify-start w-full rounded-lg pl-3 text-sm ${className}`}
25+
onClick={handleToggle}
26+
className={`flex cursor-pointer space-x-2 h-8 items-center hover:bg-[#C9D8E5] dark:hover:bg-[#193048] justify-start w-full rounded-lg pl-3 text-sm ${className}`}
2627
>
27-
<button onClick={handleToggle} className="swap swap-rotate flex flex-row gap-2 justify-start items-center">
28+
<button className="swap swap-rotate flex flex-row gap-2 justify-start items-center">
2829
{isDarkMode ? <MoonIcon className="h-5 w-5" /> : <SunIcon className="h-5 w-5" />}
2930
<span>Switch theme</span>
3031
</button>

0 commit comments

Comments
 (0)