Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 7 additions & 5 deletions packages/app-store/zapier/pages/v2/setup/index.tsx
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
import { ClipboardCopyIcon } from "@heroicons/react/solid";
import { Trans } from "next-i18next";
import Link from "next/link";
import { useState } from "react";
import { Toaster } from "react-hot-toast";

import { useLocale } from "@calcom/lib/hooks/useLocale";
import { trpc } from "@calcom/trpc/react";
import { ClipboardCopyIcon } from "@calcom/ui/Icon";
import { Button, Loader, showToast, Tooltip } from "@calcom/ui/v2";

export interface IZapierSetupProps {
Expand Down Expand Up @@ -64,16 +64,18 @@ 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="w-full rounded bg-gray-100 py-2 pl-2 pr-5">{newApiKey}</div>
<Tooltip side="top" content="copy">
<div className="my-2 mt-3 flex-wrap sm:flex sm:flex-nowrap">
<code className="h-full w-full whitespace-pre-wrap rounded-md bg-gray-100 py-2 pl-2 pr-2 sm:rounded-r-none sm:pr-5">
{newApiKey}
</code>
<Tooltip side="top" content={t("copy_to_clipboard")}>
<Button
onClick={() => {
navigator.clipboard.writeText(newApiKey);
showToast(t("api_key_copied"), "success");
}}
type="button"
className="rounded-l-none px-4 text-base">
className="mt-4 text-base sm:mt-0 sm:rounded-l-none">
<ClipboardCopyIcon className="mr-2 h-5 w-5 text-neutral-100" />
{t("copy")}
</Button>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ export default function ApiKeyDialogForm({
</div>
<div>
<div className="flex">
<code className="my-2 mr-1 w-full truncate rounded-sm bg-gray-100 py-2 px-3 align-middle font-mono text-gray-800">
<code className="mb-2 w-full truncate rounded-md rounded-r-none bg-gray-100 px-3 py-2 align-middle font-mono text-gray-800">
{apiKey}
</code>
<Tooltip side="top" content={t("copy_to_clipboard")}>
Expand All @@ -78,7 +78,7 @@ export default function ApiKeyDialogForm({
showToast(t("api_key_copied"), "success");
}}
type="button"
className=" my-2 px-4 text-base">
className="rounded-l-none py-[19px] text-base ">
<ClipboardCopyIcon className="mr-2 h-5 w-5 text-neutral-100" />
{t("copy")}
</Button>
Expand Down Expand Up @@ -112,7 +112,7 @@ export default function ApiKeyDialogForm({
}
}}
className="space-y-4">
<div className="mb-10 mt-1">
<div className="mt-1 mb-10">
<h2 className="font-semi-bold font-cal text-xl tracking-wide text-gray-900">
{defaultValues ? t("edit_api_key") : t("create_api_key")}
</h2>
Expand Down