kbar follow up (#3361)
* added more routes to kbar * added right direction for tooltip, moved search icon next to logo, added keyboard shortcuts to command bar * added right direction for tooltip, moved search icon next to logo, added keyboard shortcuts to command bar * fixed search icon for tablet * fixed search icon for mobile * hide keyboard shortcut legend on mobile * extracted strings
This commit is contained in:
1 parent
6f073762fa
commit
7ec5f01647
13 files changed
+93
-50
No files matched your search
@@ -79,7 +79,7 @@ export default function ZapierSetup(props: IZapierSetupProps) {
|
||||
<div className="mt-1 text-xl">{t("your_unique_api_key")}</div>
|
||||
<div className="my-2 mt-3 flex">
|
||||
<div className="mr-1 w-full rounded bg-gray-100 p-3 pr-5">{newApiKey}</div>
|
||||
<Tooltip content="copy to clipboard">
|
||||
<Tooltip side="top" content="copy to clipboard">
|
||||
<Button
|
||||
onClick={() => {
|
||||
navigator.clipboard.writeText(newApiKey);
|
||||
|
||||
+10
-2
@@ -1,8 +1,11 @@
|
||||
import * as TooltipPrimitive from "@radix-ui/react-tooltip";
|
||||
import React from "react";
|
||||
|
||||
import classNames from "@calcom/lib/classNames";
|
||||
|
||||
export function Tooltip({
|
||||
children,
|
||||
side,
|
||||
content,
|
||||
open,
|
||||
defaultOpen,
|
||||
@@ -12,6 +15,7 @@ export function Tooltip({
|
||||
children: React.ReactNode;
|
||||
content: React.ReactNode;
|
||||
open?: boolean;
|
||||
side?: "top" | "right" | "bottom" | "left" | undefined;
|
||||
defaultOpen?: boolean;
|
||||
onOpenChange?: (open: boolean) => void;
|
||||
}) {
|
||||
@@ -23,8 +27,12 @@ export function Tooltip({
|
||||
onOpenChange={onOpenChange}>
|
||||
<TooltipPrimitive.Trigger asChild>{children}</TooltipPrimitive.Trigger>
|
||||
<TooltipPrimitive.Content
|
||||
className="-mt-2 rounded-sm bg-black px-1 py-0.5 text-xs text-white shadow-lg"
|
||||
side="top"
|
||||
className={classNames(
|
||||
side === "top" && "-mt-2",
|
||||
side === "right" && "ml-2",
|
||||
"rounded-sm bg-black px-1 py-0.5 text-xs text-white shadow-lg"
|
||||
)}
|
||||
side={side}
|
||||
align="center"
|
||||
{...props}>
|
||||
{content}
|
||||
|
||||
Reference in new issue
Block a user