responsive navbar

This commit is contained in:
2025-05-01 11:10:31 +02:00
parent 10d1c91dea
commit 8f3a7009e1
19 changed files with 1202 additions and 47 deletions

View File

@@ -0,0 +1,22 @@
'use client'
import * as React from "react"
import { useTheme } from "next-themes"
import { Button } from "~/components/ui/button"
import ThemeIcon from "./ThemeIcon"
export function ThemeSwitch() {
const { setTheme, theme } = useTheme()
const toggleTheme = () => {
setTheme(theme == "dark" ? "light" : "dark")
}
return (
<>
<Button className="flex h-9 lg:h-full w-20 lg:w-12" variant="outline" size="icon" onClick={toggleTheme}>
<ThemeIcon activeTheme={theme}/>
<span className="sr-only">Toggle theme</span>
</Button>
</>
)
}