diff --git a/app/src/assets/scss/business/_search.scss b/app/src/assets/scss/business/_search.scss index 738bd5327..6e71ee7a3 100644 --- a/app/src/assets/scss/business/_search.scss +++ b/app/src/assets/scss/business/_search.scss @@ -133,17 +133,7 @@ } &__rmpath { - position: absolute; - height: 18px; - width: 16px; - opacity: 0.68; - transition: var(--b3-transition); - right: 0; - cursor: pointer; - - &:hover { - opacity: 1; - } + @extend .b3-form__icon-clear; } &__tip { diff --git a/app/src/assets/scss/component/_form.scss b/app/src/assets/scss/component/_form.scss index d77968694..4488e3d61 100644 --- a/app/src/assets/scss/component/_form.scss +++ b/app/src/assets/scss/component/_form.scss @@ -37,6 +37,21 @@ } } + &__icon-clear { + position: absolute; + height: 18px; + width: 16px; + opacity: 0.68; + transition: var(--b3-transition); + right: 0; + cursor: pointer; + + &:hover { + opacity: 1; + } + } + + // repo password &__icona { position: relative; color: var(--b3-theme-on-surface); diff --git a/app/src/search/assets.ts b/app/src/search/assets.ts index 98d0b478b..1ff9fbfe7 100644 --- a/app/src/search/assets.ts +++ b/app/src/search/assets.ts @@ -9,6 +9,7 @@ import {MenuItem} from "../menus/Menu"; import {Dialog} from "../dialog"; import {Menu} from "../plugin/Menu"; import {hasClosestByClassName} from "../protyle/util/hasClosest"; +import {addClearButton} from "../util/addClearButton"; export const openSearchAsset = (element: Element, isStick: boolean) => { /// #if !MOBILE @@ -43,11 +44,13 @@ export const openSearchAsset = (element: Element, isStick: boolean) => {