@@ -3,7 +3,6 @@ import { useTheme } from '@docsearch/core/useTheme';
33import React , { useEffect , useState , type JSX } from 'react' ;
44
55import { getKeyboardShortcuts } from './constants/keyboardShortcuts' ;
6- import { ControlKeyIcon , KKeyIcon , MetaKeyIcon } from './icons/MetaKeysIcon' ;
76import { SearchIcon } from './icons/SearchIcon' ;
87import type { DocSearchTheme } from './types' ;
98import { ACTION_KEY_APPLE , ACTION_KEY_DEFAULT , isAppleDevice } from './utils' ;
@@ -32,12 +31,10 @@ export const DocSearchButton = React.forwardRef<HTMLButtonElement, DocSearchButt
3231 }
3332 } , [ ] ) ;
3433
35- const [ actionKeyReactsTo , actionKeyAltText , actionKeyChild ] =
34+ const [ actionKeyReactsTo , actionKeyAltText , actionKeyLabel ] =
3635 key === ACTION_KEY_DEFAULT
37- ? // eslint-disable-next-line react/jsx-key -- false flag
38- ( [ ACTION_KEY_DEFAULT , 'Control' , < ControlKeyIcon /> ] as const )
39- : // eslint-disable-next-line react/jsx-key -- false flag
40- ( [ 'Meta' , 'Meta' , < MetaKeyIcon /> ] as const ) ;
36+ ? ( [ ACTION_KEY_DEFAULT , 'Control' , 'Ctrl' ] as const )
37+ : ( [ 'Meta' , 'Meta' , '⌘' ] as const ) ;
4138
4239 const isCtrlCmdKEnabled = resolvedShortcuts [ 'Ctrl/Cmd+K' ] ;
4340 const shortcut = `${ actionKeyAltText } +k` ;
@@ -59,10 +56,8 @@ export const DocSearchButton = React.forwardRef<HTMLButtonElement, DocSearchButt
5956 < span className = "DocSearch-Button-Keys" >
6057 { key !== null && isCtrlCmdKEnabled && (
6158 < >
62- < DocSearchButtonKey reactsToKey = { actionKeyReactsTo } > { actionKeyChild } </ DocSearchButtonKey >
63- < DocSearchButtonKey reactsToKey = "k" >
64- < KKeyIcon />
65- </ DocSearchButtonKey >
59+ < DocSearchButtonKey reactsToKey = { actionKeyReactsTo } > { actionKeyLabel } </ DocSearchButtonKey >
60+ < DocSearchButtonKey reactsToKey = "k" > K</ DocSearchButtonKey >
6661 </ >
6762 ) }
6863 </ span >
0 commit comments