update command keys (#2271)

This commit is contained in:
pablodanswer
2024-08-30 10:54:24 -07:00
committed by GitHub
parent 1734a4a18c
commit 8f26728a29
3 changed files with 51 additions and 8 deletions

View File

@@ -53,10 +53,10 @@ const ToggleSwitch = () => {
onClick={() => handleTabChange("search")} onClick={() => handleTabChange("search")}
> >
<SearchIcon size={16} className="mr-2" /> <SearchIcon size={16} className="mr-2" />
<p className="items-baseline flex"> <div className="flex items-end">
Search Search
<span className="text-xs ml-2">{commandSymbol}S</span> <div className="ml-2 flex items-end">{commandSymbol}S</div>
</p> </div>
</button> </button>
<button <button
className={`px-4 py-2 rounded-full text-sm font-medium transition-colors duration-300 ease-in-out flex items-center relative z-10 ${ className={`px-4 py-2 rounded-full text-sm font-medium transition-colors duration-300 ease-in-out flex items-center relative z-10 ${
@@ -67,10 +67,10 @@ const ToggleSwitch = () => {
onClick={() => handleTabChange("chat")} onClick={() => handleTabChange("chat")}
> >
<ChatIcon size={16} className="mr-2" /> <ChatIcon size={16} className="mr-2" />
<p className="items-baseline flex"> <div className="items-end flex">
Chat Chat
<span className="text-xs ml-2">{commandSymbol}D</span> <div className="ml-2 flex items-end">{commandSymbol}D</div>
</p> </div>
</button> </button>
</div> </div>
); );

View File

@@ -2754,3 +2754,45 @@ export const CameraIcon = ({
</svg> </svg>
); );
}; };
export const MacIcon = ({
size = 16,
className = "my-auto flex flex-shrink-0 ",
}: IconProps) => {
return (
<svg
style={{ width: `${size}px`, height: `${size}px` }}
className={`w-[${size}px] h-[${size}px] ` + className}
xmlns="http://www.w3.org/2000/svg"
width="200"
height="200"
viewBox="0 0 24 24"
>
<path
fill="currentColor"
d="M6.5 4.5a2 2 0 0 1 2 2v2h-2a2 2 0 1 1 0-4Zm4 4v-2a4 4 0 1 0-4 4h2v3h-2a4 4 0 1 0 4 4v-2h3v2a4 4 0 1 0 4-4h-2v-3h2a4 4 0 1 0-4-4v2h-3Zm0 2h3v3h-3v-3Zm5-2v-2a2 2 0 1 1 2 2h-2Zm0 7h2a2 2 0 1 1-2 2v-2Zm-7 0v2a2 2 0 1 1-2-2h2Z"
/>
</svg>
);
};
export const WindowsIcon = ({
size = 16,
className = "my-auto flex flex-shrink-0 ",
}: IconProps) => {
return (
<svg
style={{ width: `${size}px`, height: `${size}px` }}
className={`w-[${size}px] h-[${size}px] ` + className}
xmlns="http://www.w3.org/2000/svg"
viewBox="0 0 24 24"
width="24"
height="24"
>
<path
fill="currentColor"
d="M3 3h8v8H3V3zm10 0h8v8h-8V3zm-10 10h8v8H3v-8zm10 0h8v8h-8v-8z"
/>
</svg>
);
};

View File

@@ -1,5 +1,6 @@
"use client"; "use client";
import { MacIcon, WindowsIcon } from "@/components/icons/icons";
import { useState, useEffect } from "react"; import { useState, useEffect } from "react";
type OperatingSystem = "Windows" | "Mac" | "Other"; type OperatingSystem = "Windows" | "Mac" | "Other";
@@ -23,9 +24,9 @@ const KeyboardSymbol = () => {
const os = useOperatingSystem(); const os = useOperatingSystem();
if (os === "Windows") { if (os === "Windows") {
return "⊞"; return <WindowsIcon size={12} />;
} else { } else {
return "⌘"; return <MacIcon size={12} />;
} }
}; };