diff options
| author | Yash <[email protected]> | 2024-04-02 11:43:42 +0000 |
|---|---|---|
| committer | Yash <[email protected]> | 2024-04-02 11:43:42 +0000 |
| commit | 13d0a10d7f7e2c85a2e41d91c9ee6b99146f9edd (patch) | |
| tree | 6fee4a184e2575c22531549bd9fa6d5bda8b5786 /apps/web/src/components/ui | |
| parent | input with icon (diff) | |
| download | supermemory-13d0a10d7f7e2c85a2e41d91c9ee6b99146f9edd.tar.xz supermemory-13d0a10d7f7e2c85a2e41d91c9ee6b99146f9edd.zip | |
placeholder
Diffstat (limited to 'apps/web/src/components/ui')
| -rw-r--r-- | apps/web/src/components/ui/input.tsx | 16 |
1 files changed, 10 insertions, 6 deletions
diff --git a/apps/web/src/components/ui/input.tsx b/apps/web/src/components/ui/input.tsx index dba310dc..deb877dd 100644 --- a/apps/web/src/components/ui/input.tsx +++ b/apps/web/src/components/ui/input.tsx @@ -11,7 +11,7 @@ const Input = React.forwardRef<HTMLInputElement, InputProps>( <input type={type} className={cn( - "border-rgray-6 text-rgray-12 ring-offset-rgray-2 placeholder:text-rgray-11 focus-visible:ring-rgray-7 flex h-10 w-full rounded-md border bg-transparent px-3 py-2 text-sm transition file:border-0 file:bg-transparent file:text-sm file:font-medium focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50 ", + "border-rgray-6 text-rgray-12 ring-offset-rgray-2 placeholder:text-rgray-11 focus-visible:ring-rgray-7 flex h-10 w-full rounded-md border bg-transparent px-3 py-2 text-sm transition file:border-0 file:bg-transparent file:text-sm file:font-medium focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-offset-1 disabled:cursor-not-allowed disabled:opacity-50 ", className, )} ref={ref} @@ -29,14 +29,18 @@ export interface InputWithIconProps const InputWithIcon = React.forwardRef<HTMLInputElement, InputWithIconProps>( ({ className, type, icon, ...props }, ref) => { return ( - <div className="border-rgray-6 text-rgray-12 ring-offset-rgray-2 focus-within:ring-rgray-7 flex h-10 w-full items-center justify-center gap-2 rounded-md border bg-transparent px-3 py-2 text-sm transition focus-within:outline-none focus-within:ring-2 focus-within:ring-offset-2 "> + <div + className={cn( + "border-rgray-6 text-rgray-12 ring-offset-rgray-2 focus-within:ring-rgray-7 flex h-10 w-full items-center justify-center gap-2 rounded-md border bg-transparent px-3 py-2 text-sm transition focus-within:outline-none focus-within:ring-2 focus-within:ring-offset-1 ", + className, + )} + > {icon} <input type={type} - className={cn( - "placeholder:text-rgray-11 file:border-0 file:bg-transparent file:text-sm file:font-medium disabled:cursor-not-allowed disabled:opacity-50 ", - className, - )} + className={ + "placeholder:text-rgray-11/50 w-full bg-transparent file:border-0 file:bg-transparent file:text-sm file:font-medium focus-visible:outline-none disabled:cursor-not-allowed disabled:opacity-50" + } ref={ref} {...props} /> |