summaryrefslogtreecommitdiff
path: root/src/index.tsx
diff options
context:
space:
mode:
authorWojciech Kwolek <wojciech@kwolek.io>2024-06-08 06:45:40 +0200
committerWojciech Kwolek <wojciech@kwolek.io>2024-06-08 06:46:17 +0200
commitf38465d0e280cdfb4db8b82502f5343dec4012dc (patch)
treec086b8282a5e8230e06e000742adac878050dede /src/index.tsx
parent8fd148f091a2c7bb0a71996bcc7ff29e2f047339 (diff)
add -p (--prompt)
Diffstat (limited to 'src/index.tsx')
-rw-r--r--src/index.tsx12
1 files changed, 10 insertions, 2 deletions
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<string[]>();
const socket = useRef<Socket>();
@@ -44,7 +52,7 @@ export default function Command({ arguments: { host, port } }: { arguments: { ho
}, [host, port]);
return (
- <List isLoading={elements === undefined}>
+ <List isLoading={elements === undefined} searchBarPlaceholder={prompt}>
{elements?.map((item, idx) => (
<List.Item
title={item}