aboutsummaryrefslogtreecommitdiff
path: root/apps/web/src/components/ui
diff options
context:
space:
mode:
authoryxshv <[email protected]>2024-04-13 18:11:14 +0530
committeryxshv <[email protected]>2024-04-13 18:11:14 +0530
commit5b340071245cfe9906fd3534ec5176de1e3fd3bd (patch)
treebf4860f810f58adcfec4cc0ad3fdcc3da62bda95 /apps/web/src/components/ui
parentsearch results (diff)
downloadsupermemory-5b340071245cfe9906fd3534ec5176de1e3fd3bd.tar.xz
supermemory-5b340071245cfe9906fd3534ec5176de1e3fd3bd.zip
spaces dialog
Diffstat (limited to 'apps/web/src/components/ui')
-rw-r--r--apps/web/src/components/ui/command.tsx9
1 files changed, 5 insertions, 4 deletions
diff --git a/apps/web/src/components/ui/command.tsx b/apps/web/src/components/ui/command.tsx
index 74b7f2e8..f3534b55 100644
--- a/apps/web/src/components/ui/command.tsx
+++ b/apps/web/src/components/ui/command.tsx
@@ -3,10 +3,11 @@
import * as React from "react";
import { type DialogProps } from "@radix-ui/react-dialog";
import { Command as CommandPrimitive } from "cmdk";
-import { Search } from "lucide-react";
+import { Loader, Search } from "lucide-react";
import { cn } from "@/lib/utils";
import { Dialog, DialogContent } from "@/components/ui/dialog";
+import { isSea } from "node:sea";
const Command = React.forwardRef<
React.ElementRef<typeof CommandPrimitive>,
@@ -39,13 +40,13 @@ const CommandDialog = ({ children, ...props }: CommandDialogProps) => {
const CommandInput = React.forwardRef<
React.ElementRef<typeof CommandPrimitive.Input>,
- React.ComponentPropsWithoutRef<typeof CommandPrimitive.Input>
->(({ className, ...props }, ref) => (
+ React.ComponentPropsWithoutRef<typeof CommandPrimitive.Input> & { isSearching?: boolean }
+>(({ className, isSearching = false ,...props }, ref) => (
<div
className="border-rgray-6 flex items-center border-b px-3"
cmdk-input-wrapper=""
>
- <Search className="mr-2 h-4 w-4 shrink-0 opacity-50" />
+ {isSearching ? <Loader className="mr-2 h-4 w-4 shrink-9 opacity-50 animate-spin" /> : <Search className="mr-2 h-4 w-4 shrink-0 opacity-50" />}
<CommandPrimitive.Input
ref={ref}
className={cn(