feat: update RicercaCommand button styling and replace LangToggle with SettingsPopover in SiteHeader
This commit is contained in:
parent
c153dca662
commit
e68a2720d5
3 changed files with 7 additions and 9 deletions
|
|
@ -26,8 +26,8 @@ export function RicercaCommand() {
|
||||||
<>
|
<>
|
||||||
<Dialog onOpenChange={setOpen} open={open}>
|
<Dialog onOpenChange={setOpen} open={open}>
|
||||||
<DialogTrigger asChild>
|
<DialogTrigger asChild>
|
||||||
<Button aria-label="ricercaBtn" variant="ghost">
|
<Button aria-label="ricercaBtn" className="p-2" variant="ghost">
|
||||||
<Search className="size-6" />
|
<Search className="size-5" />
|
||||||
</Button>
|
</Button>
|
||||||
</DialogTrigger>
|
</DialogTrigger>
|
||||||
<DialogContent className="border-none bg-transparent sm:max-w-xl [&_[data-slot=dialog-close]]:hidden">
|
<DialogContent className="border-none bg-transparent sm:max-w-xl [&_[data-slot=dialog-close]]:hidden">
|
||||||
|
|
|
||||||
|
|
@ -5,8 +5,7 @@ import { UserHeaderSection } from "~/components/navbar/login-button";
|
||||||
import { MainNav } from "~/components/navbar/main-nav";
|
import { MainNav } from "~/components/navbar/main-nav";
|
||||||
import { MobileNav } from "~/components/navbar/mobile-nav";
|
import { MobileNav } from "~/components/navbar/mobile-nav";
|
||||||
import { RicercaCommand } from "~/components/navbar/ricerca_command";
|
import { RicercaCommand } from "~/components/navbar/ricerca_command";
|
||||||
import { LangToggle } from "./lang-toggle";
|
import { SettingsPopover } from "./settings-modal";
|
||||||
import { ThemeSwitch } from "./theme-toggle";
|
|
||||||
|
|
||||||
export function SiteHeader() {
|
export function SiteHeader() {
|
||||||
const pathname = usePathname();
|
const pathname = usePathname();
|
||||||
|
|
@ -37,8 +36,7 @@ export function SiteHeader() {
|
||||||
<RicercaCommand />
|
<RicercaCommand />
|
||||||
|
|
||||||
<div className="hidden w-fit items-center gap-2 md:flex">
|
<div className="hidden w-fit items-center gap-2 md:flex">
|
||||||
<LangToggle />
|
<SettingsPopover />
|
||||||
<ThemeSwitch />
|
|
||||||
</div>
|
</div>
|
||||||
<UserHeaderSection
|
<UserHeaderSection
|
||||||
key={pathname}
|
key={pathname}
|
||||||
|
|
|
||||||
|
|
@ -46,15 +46,15 @@ const ThemeSwitchContent = () => {
|
||||||
type="button"
|
type="button"
|
||||||
>
|
>
|
||||||
<motion.div
|
<motion.div
|
||||||
animate={{ opacity: 1 }}
|
//animate={{ opacity: 1 }}
|
||||||
className={cn(
|
className={cn(
|
||||||
"flex size-5.5 items-center justify-center rounded-full bg-black",
|
"flex size-5.5 items-center justify-center rounded-full bg-black",
|
||||||
theme === "light" ? "bg-yellow-300" : "bg-gray-800/60",
|
theme === "light" ? "bg-yellow-300" : "bg-gray-800/60",
|
||||||
)}
|
)}
|
||||||
initial={{ opacity: 0 }}
|
//initial={{ opacity: 0 }}
|
||||||
layout
|
layout
|
||||||
transition={{
|
transition={{
|
||||||
opacity: { duration: 0.1, ease: "easeInOut", delay: 0.5 }, // Fast fade in
|
//opacity: { duration: 0.1, ease: "easeInOut", delay: 0.5 }, // Fast fade in
|
||||||
layout: spring, // Spring for position change
|
layout: spring, // Spring for position change
|
||||||
}}
|
}}
|
||||||
>
|
>
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue