From f38465d0e280cdfb4db8b82502f5343dec4012dc Mon Sep 17 00:00:00 2001 From: Wojciech Kwolek Date: Sat, 8 Jun 2024 06:45:40 +0200 Subject: add -p (--prompt) --- src/index.tsx | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) (limited to 'src') diff --git a/src/index.tsx b/src/index.tsx index aa7f16b..03ace88 100644 --- a/src/index.tsx +++ b/src/index.tsx @@ -3,7 +3,15 @@ import { connect, Socket } from "net"; import { showFailureToast } from "@raycast/utils"; import { useState, useEffect, useRef } from "react"; -export default function Command({ arguments: { host, port } }: { arguments: { host: string; port: string } }) { +type Props = { + arguments: { + host: string; + port: string; + prompt?: string; + }; +}; + +export default function Command({ arguments: { host, port, prompt } }: Props) { const [elements, setElements] = useState(); const socket = useRef(); @@ -44,7 +52,7 @@ export default function Command({ arguments: { host, port } }: { arguments: { ho }, [host, port]); return ( - + {elements?.map((item, idx) => (