diff --git a/apps/dashboard/src/components/ui/copy-field.tsx b/apps/dashboard/src/components/ui/copy-field.tsx index a8945be55..a3458c14b 100644 --- a/apps/dashboard/src/components/ui/copy-field.tsx +++ b/apps/dashboard/src/components/ui/copy-field.tsx @@ -1,8 +1,12 @@ +"use client"; + +import React, { useState } from "react"; import { Input } from "./input"; import { Label } from "./label"; import { SimpleTooltip } from "./simple-tooltip"; import { Textarea } from "./textarea"; import { CopyButton } from "./copy-button"; +import { EyeIcon, EyeSlashIcon } from "@phosphor-icons/react"; export function CopyField(props: { value: string, @@ -11,12 +15,15 @@ export function CopyField(props: { monospace?: boolean, fixedSize?: boolean, initialCopied?: boolean, + isSecret?: boolean, } & ({ type: "textarea", height?: number, } | { type: "input", })) { + const [isRevealed, setIsRevealed] = useState(false); + return (