Adds a loading spinner that replaces send icon while result is generated (#329)
This commit is contained in:
		
							parent
							
								
									56d3b2fba2
								
							
						
					
					
						commit
						23ad285a4b
					
				|  | @ -286,7 +286,11 @@ export const ChatInput: FC<Props> = ({ | ||||||
|             className="absolute right-2 top-2 rounded-sm p-1 text-neutral-800 opacity-60 hover:bg-neutral-200 hover:text-neutral-900 dark:bg-opacity-50 dark:text-neutral-100 dark:hover:text-neutral-200" |             className="absolute right-2 top-2 rounded-sm p-1 text-neutral-800 opacity-60 hover:bg-neutral-200 hover:text-neutral-900 dark:bg-opacity-50 dark:text-neutral-100 dark:hover:text-neutral-200" | ||||||
|             onClick={handleSend} |             onClick={handleSend} | ||||||
|           > |           > | ||||||
|  |             {messageIsStreaming ? ( | ||||||
|  |               <div className="h-4 w-4 animate-spin rounded-full border-t-2 border-neutral-800 opacity-60 dark:border-neutral-100"></div> | ||||||
|  |             ) : ( | ||||||
|               <IconSend size={18} /> |               <IconSend size={18} /> | ||||||
|  |             )} | ||||||
|           </button> |           </button> | ||||||
| 
 | 
 | ||||||
|           {showPromptList && filteredPrompts.length > 0 && ( |           {showPromptList && filteredPrompts.length > 0 && ( | ||||||
|  |  | ||||||
		Loading…
	
		Reference in New Issue