aboutsummaryrefslogtreecommitdiffstats
path: root/apps/web/components/settings/ApiKeySuccess.tsx
blob: 370d711bda6c692e3e810d15aca91fa58e982b2b (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
import CopyBtn from "@/components/ui/copy-button";
import { Input } from "@/components/ui/input";

export default function ApiKeySuccess({
  apiKey,
  message,
}: {
  apiKey: string;
  message: string;
}) {
  return (
    <div>
      <div className="py-4 text-sm text-muted-foreground">{message}</div>
      <div className="flex space-x-2 pt-2">
        <Input value={apiKey} readOnly />
        <CopyBtn
          getStringToCopy={() => {
            return apiKey;
          }}
        />
      </div>
    </div>
  );
}