From b094b2cecb0da1bcdf4c63dd081638d87793c53c Mon Sep 17 00:00:00 2001
From: MohamedBassem <me@mbassem.com>
Date: Mon, 26 Aug 2024 13:41:13 +0300
Subject: feature(mobile): Change the view bookmark page to be a modal and add
 tags and notes

---
 apps/mobile/components/ui/Input.tsx | 15 ++++++++++++---
 1 file changed, 12 insertions(+), 3 deletions(-)

(limited to 'apps/mobile/components/ui/Input.tsx')

diff --git a/apps/mobile/components/ui/Input.tsx b/apps/mobile/components/ui/Input.tsx
index 57d16f5d..dc84f54f 100644
--- a/apps/mobile/components/ui/Input.tsx
+++ b/apps/mobile/components/ui/Input.tsx
@@ -1,5 +1,5 @@
 import { forwardRef } from "react";
-import { Text, TextInput, View } from "react-native";
+import { ActivityIndicator, Text, TextInput, View } from "react-native";
 import { cn } from "@/lib/utils";
 
 import { TailwindResolver } from "../TailwindResolver";
@@ -11,8 +11,14 @@ export interface InputProps
   inputClasses?: string;
 }
 
-const Input = forwardRef<React.ElementRef<typeof TextInput>, InputProps>(
-  ({ className, label, labelClasses, inputClasses, ...props }, ref) => (
+const Input = forwardRef<
+  React.ElementRef<typeof TextInput>,
+  InputProps & { loading?: boolean }
+>(
+  (
+    { className, label, labelClasses, inputClasses, loading, ...props },
+    ref,
+  ) => (
     <View className={cn("flex flex-col gap-1.5", className)}>
       {label && <Text className={cn("text-base", labelClasses)}>{label}</Text>}
       <TailwindResolver
@@ -30,6 +36,9 @@ const Input = forwardRef<React.ElementRef<typeof TextInput>, InputProps>(
           />
         )}
       />
+      {loading && (
+        <ActivityIndicator className="absolute bottom-0 right-0 p-2" />
+      )}
     </View>
   ),
 );
-- 
cgit v1.2.3-70-g09d2

