Explorar o código

remove clear icon check for input

davitbejanyan %!s(int64=2) %!d(string=hai) anos
pai
achega
9588e88300

+ 3 - 3
kafka-ui-react-app/src/components/common/Input/Input.tsx

@@ -16,7 +16,7 @@ export interface InputProps
   withError?: boolean;
   label?: React.ReactNode;
   hint?: React.ReactNode;
-  icon?: React.ReactNode;
+  clearIcon?: React.ReactNode;
 
   // Some may only accept integer, like `Number of Partitions`
   // some may accept decimal
@@ -112,7 +112,7 @@ const Input = React.forwardRef<HTMLInputElement, InputProps>((props, ref) => {
     withError = false,
     label,
     hint,
-    icon,
+    clearIcon,
     ...rest
   } = props;
 
@@ -187,7 +187,7 @@ const Input = React.forwardRef<HTMLInputElement, InputProps>((props, ref) => {
           ref={ref}
           {...inputOptions}
         />
-        {search && icon}
+        {clearIcon}
 
         {withError && isHookFormField && (
           <S.FormError>

+ 1 - 1
kafka-ui-react-app/src/components/common/Search/Search.tsx

@@ -64,7 +64,7 @@ const Search: React.FC<SearchProps> = ({
       disabled={disabled}
       ref={ref}
       search
-      icon={
+      clearIcon={
         <IconButtonWrapper onClick={clearSearchValue}>
           <CloseIcon />
         </IconButtonWrapper>