File tree Expand file tree Collapse file tree 3 files changed +7
-8
lines changed
packages/nextjs/components Expand file tree Collapse file tree 3 files changed +7
-8
lines changed Original file line number Diff line number Diff line change 33import React from "react" ;
44import Link from "next/link" ;
55import { usePathname } from "next/navigation" ;
6- import { SwitchTheme } from "./SwitchTheme" ;
76import { PunkConnectButton } from "./punk-society/BasedConnectButton" ;
87import { ConfigMenu } from "./punk-society/ConfigMenu" ;
98import { FaucetButton } from "./scaffold-eth" ;
@@ -20,7 +19,6 @@ export const Header = () => {
2019 < div className = "flex lg:sticky top-0 navbar bg-base-100 min-h-0 flex-shrink-0 justify-between z-20 px-0 sm:px-2" >
2120 < div className = "navbar-start ml-4 lg:ml-2" >
2221 < div className = "flex lg:hidden" >
23- < SwitchTheme />
2422 < div className = "flex justify-center items-center ml-8 lg:ml-0" >
2523 < Link href = "/" passHref >
2624 < span className = "inline-flex items-center gap-2" >
@@ -130,9 +128,6 @@ export const Header = () => {
130128 < div className = "" >
131129 < ConfigMenu />
132130 </ div >
133- < div className = "hidden lg:flex " >
134- < SwitchTheme />
135- </ div >
136131 </ div >
137132 </ div >
138133 </ div >
Original file line number Diff line number Diff line change @@ -21,9 +21,10 @@ export const SwitchTheme = ({ className }: { className?: string }) => {
2121 if ( ! mounted ) return null ;
2222
2323 return (
24- < div className = { `flex space-x-2 h-8 items-center justify-center text-sm ${ className } ` } >
25- < button onClick = { handleToggle } className = "swap swap-rotate" >
24+ < div className = { `flex space-x-2 h-8 items-center justify-start w-full ml-3 text-sm ${ className } ` } >
25+ < button onClick = { handleToggle } className = "swap swap-rotate flex flex-row gap-2 justify-start items-center " >
2626 { isDarkMode ? < MoonIcon className = "h-5 w-5" /> : < SunIcon className = "h-5 w-5" /> }
27+ < span > Switch theme</ span >
2728 </ button >
2829 </ div >
2930 ) ;
Original file line number Diff line number Diff line change @@ -10,6 +10,7 @@ import {
1010 QrCodeIcon ,
1111} from "@heroicons/react/24/outline" ;
1212import { LanguageIcon } from "@heroicons/react/24/solid" ;
13+ import { SwitchTheme } from "~~/components/SwitchTheme" ;
1314import { useOutsideClick } from "~~/hooks/scaffold-eth" ;
1415import { getTargetNetworks } from "~~/utils/scaffold-eth" ;
1516
@@ -48,7 +49,9 @@ export const AddressInfoDropdown = ({ blockExplorerAddressLink }: AddressInfoDro
4849 className = "dropdown-content menu z-[2] p-2 mt-2 shadow-center shadow-accent bg-base-200 rounded-box gap-1"
4950 >
5051 < NetworkOptions hidden = { ! selectingNetwork } />
51-
52+ < div className = "hidden lg:flex items-center justify-center " >
53+ < SwitchTheme />
54+ </ div >
5255 < li className = { selectingNetwork ? "hidden" : "" } >
5356 < label
5457 htmlFor = "qrcode-modal"
You can’t perform that action at this time.
0 commit comments