Explorar el Código

Merge pull request #12776 from overleaf/ae-search-close-tooltip

[cm6] Add tooltip to search panel close button

GitOrigin-RevId: ba7f4ca5d672580054cb6214be94497fd5141730
Alf Eaton hace 3 años
padre
commit
c53411ff1d

+ 10 - 8
services/web/frontend/js/features/source-editor/components/codemirror-search-form.tsx

@@ -412,14 +412,16 @@ const CodeMirrorSearchForm: FC = () => {
       </div>
 
       <div className="ol-cm-search-form-close">
-        <button
-          className="close"
-          onClick={() => closeSearchPanel(view)}
-          type="button"
-          aria-label={t('close')}
-        >
-          <span aria-hidden="true">&times;</span>
-        </button>
+        <Tooltip id="search-close" description={<>{t('close')} (Esc)</>}>
+          <button
+            className="close"
+            onClick={() => closeSearchPanel(view)}
+            type="button"
+            aria-label={t('close')}
+          >
+            <span aria-hidden="true">&times;</span>
+          </button>
+        </Tooltip>
       </div>
     </form>
   )