From d903c7f905eae617123356fdfdf09c3075e9cae1 Mon Sep 17 00:00:00 2001 From: Mohamed Bassem Date: Sun, 25 May 2025 12:31:51 +0000 Subject: fix: Fix end icon in smart list input overlapping with text. Fixes #1379 --- apps/web/components/dashboard/lists/EditListModal.tsx | 14 ++++++++------ apps/web/components/dashboard/search/SearchInput.tsx | 2 +- apps/web/components/ui/input.tsx | 16 ++++++---------- 3 files changed, 15 insertions(+), 17 deletions(-) (limited to 'apps/web') diff --git a/apps/web/components/dashboard/lists/EditListModal.tsx b/apps/web/components/dashboard/lists/EditListModal.tsx index 68d32b0a..7a750c33 100644 --- a/apps/web/components/dashboard/lists/EditListModal.tsx +++ b/apps/web/components/dashboard/lists/EditListModal.tsx @@ -358,14 +358,16 @@ export function EditListModal({ value={field.value} onChange={field.onChange} placeholder={t("lists.search_query")} + endIcon={ + parsedSearchQuery ? ( + + ) : undefined + } /> - {parsedSearchQuery && ( - - )} )} } ref={inputRef} value={value} onChange={onChange} diff --git a/apps/web/components/ui/input.tsx b/apps/web/components/ui/input.tsx index 09f9def9..66cd1108 100644 --- a/apps/web/components/ui/input.tsx +++ b/apps/web/components/ui/input.tsx @@ -1,23 +1,19 @@ import * as React from "react"; import { cn } from "@/lib/utils"; -import { LucideIcon } from "lucide-react"; export interface InputProps extends React.InputHTMLAttributes { - startIcon?: LucideIcon; - endIcon?: LucideIcon; + startIcon?: React.ReactNode; + endIcon?: React.ReactNode; } const Input = React.forwardRef( ({ className, type, startIcon, endIcon, ...props }, ref) => { - const StartIcon = startIcon; - const EndIcon = endIcon; - return (
- {StartIcon && ( + {startIcon && (
- + {startIcon}
)} ( ref={ref} {...props} /> - {EndIcon && ( + {endIcon && (
- + {endIcon}
)}
-- cgit v1.2.3-70-g09d2