Spaces:
Running
on
CPU Upgrade
Running
on
CPU Upgrade
test responsive
Browse files- components/editor/header.tsx +41 -40
components/editor/header.tsx
CHANGED
|
@@ -31,48 +31,49 @@ export const EditorHeader = ({
|
|
| 31 |
<div className="w-5 h-5 block xl:hidden" onClick={onToggleMenu}>
|
| 32 |
<TbMenu2 className="w-full h-full text-slate-600 dark:text-slate-100" />
|
| 33 |
</div>
|
| 34 |
-
<Image
|
| 35 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 36 |
Hub API Playground
|
| 37 |
</p>
|
| 38 |
-
<div className="
|
| 39 |
-
|
| 40 |
-
|
| 41 |
-
|
| 42 |
-
|
| 43 |
-
|
| 44 |
-
|
| 45 |
-
|
| 46 |
-
|
| 47 |
-
|
| 48 |
-
|
| 49 |
-
|
| 50 |
-
|
| 51 |
-
|
| 52 |
-
|
| 53 |
-
|
| 54 |
-
|
| 55 |
-
|
| 56 |
-
|
| 57 |
-
|
| 58 |
-
|
| 59 |
-
|
| 60 |
-
|
| 61 |
-
|
| 62 |
-
|
| 63 |
-
|
| 64 |
-
|
| 65 |
-
|
| 66 |
-
|
| 67 |
-
|
| 68 |
-
|
| 69 |
-
|
| 70 |
-
|
| 71 |
-
setTheme("dark");
|
| 72 |
-
}}
|
| 73 |
-
>
|
| 74 |
-
<MdOutlineNightlight />
|
| 75 |
-
</div>
|
| 76 |
</div>
|
| 77 |
</div>
|
| 78 |
</header>
|
|
|
|
| 31 |
<div className="w-5 h-5 block xl:hidden" onClick={onToggleMenu}>
|
| 32 |
<TbMenu2 className="w-full h-full text-slate-600 dark:text-slate-100" />
|
| 33 |
</div>
|
| 34 |
+
<Image
|
| 35 |
+
src={HFLogo}
|
| 36 |
+
alt="Hugging Face Logo"
|
| 37 |
+
width={34}
|
| 38 |
+
height={34}
|
| 39 |
+
className="max-xl:hidden"
|
| 40 |
+
/>
|
| 41 |
+
<p className="text-gray-800 dark:text-gray-300 font-code text-sm font-semiboldn">
|
| 42 |
Hub API Playground
|
| 43 |
</p>
|
| 44 |
+
<div className="rounded-full bg-gray-100 border-gray-200 dark:bg-slate-800 border dark:border-slate-700 p-0.5 flex items-center justify-between relative z-[1] cursor-pointer">
|
| 45 |
+
<div
|
| 46 |
+
className={classNames(
|
| 47 |
+
"transition-transform duration-200 ease-in-out top-0.5 w-6 h-6 rounded-full absolute -z-[1]",
|
| 48 |
+
{
|
| 49 |
+
"translate-x-full bg-indigo-500": theme === "dark",
|
| 50 |
+
"translate-x-0 bg-amber-500": theme === "light",
|
| 51 |
+
}
|
| 52 |
+
)}
|
| 53 |
+
/>
|
| 54 |
+
<div
|
| 55 |
+
className={`size-6 rounded-full flex items-center justify-center ${
|
| 56 |
+
theme === "light"
|
| 57 |
+
? "text-white"
|
| 58 |
+
: "dark:text-slate-500 text-gray-400"
|
| 59 |
+
} p-1`}
|
| 60 |
+
onClick={() => {
|
| 61 |
+
setTheme("light");
|
| 62 |
+
}}
|
| 63 |
+
>
|
| 64 |
+
<MdOutlineLightMode />
|
| 65 |
+
</div>
|
| 66 |
+
<div
|
| 67 |
+
className={`size-6 rounded-full flex items-center justify-center ${
|
| 68 |
+
theme === "dark"
|
| 69 |
+
? "text-white"
|
| 70 |
+
: "dark:text-slate-500 text-gray-400"
|
| 71 |
+
} p-1`}
|
| 72 |
+
onClick={() => {
|
| 73 |
+
setTheme("dark");
|
| 74 |
+
}}
|
| 75 |
+
>
|
| 76 |
+
<MdOutlineNightlight />
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 77 |
</div>
|
| 78 |
</div>
|
| 79 |
</header>
|