فهرست منبع

fix: hide browser clear icon of search input (#1598)

* fix: hide browser clear icon of search input

* fix: hide browser clear icon of search input, remove moz prefix
pointhalo 2 سال پیش
والد
کامیت
d52e18087e
2فایلهای تغییر یافته به همراه5 افزوده شده و 1 حذف شده
  1. 3 0
      packages/semi-foundation/input/input.scss
  2. 2 1
      packages/semi-ui/input/_story/input.stories.jsx

+ 3 - 0
packages/semi-foundation/input/input.scss

@@ -462,6 +462,9 @@ $module: #{$prefix}-input;
     &[type="password"]::-ms-clear {
         display: none;
     }
+    &[type="search"]::-webkit-search-cancel-button {
+        display: none;
+    }
 
     &::placeholder {
         color: $color-input_placeholder-text-default;

+ 2 - 1
packages/semi-ui/input/_story/input.stories.jsx

@@ -104,11 +104,12 @@ InputDisabled.story = {
 export const InputClearable = () => (
   <div className="input">
     <Input showClear defaultValue="ies" />
+    <Input showClear defaultValue="search input" type='search' />
   </div>
 );
 
 InputClearable.story = {
-  name: 'Input clearable',
+  name: 'Input showClear',
 };
 
 export const InputPrefixSuffixDemo = () => (