import { Check, Copy } from "lucide"; import { MorphIcon } from "~/components/MorphIcon"; import { useCopyToClipboard } from "~/hooks/useCopyToClipboard"; import { cn } from "~/lib/utils"; import { Button } from "./ui/button"; /** A shell command to copy and run elsewhere, such as on the environment's host. */ export function CommandBlock({ command, className, prominent = false, }: { readonly command: string; readonly className?: string; readonly prominent?: boolean; }) { const { copyToClipboard, isCopied } = useCopyToClipboard({ timeout: 1500, target: "command", }); return (
$ {command}
); }