Skip to content

Commit 7459a42

Browse files
fix(button): use kbd instead of span (#1335)
Co-authored-by: shortcuts <[email protected]>
1 parent fca7347 commit 7459a42

File tree

2 files changed

+11
-11
lines changed

2 files changed

+11
-11
lines changed

packages/docsearch-react/src/DocSearchButton.tsx

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -50,10 +50,10 @@ export const DocSearchButton = React.forwardRef<
5050
<span className="DocSearch-Button-Keys">
5151
{key !== null && (
5252
<>
53-
<span className="DocSearch-Button-Key">
53+
<kbd className="DocSearch-Button-Key">
5454
{key === ACTION_KEY_DEFAULT ? <ControlKeyIcon /> : key}
55-
</span>
56-
<span className="DocSearch-Button-Key">K</span>
55+
</kbd>
56+
<kbd className="DocSearch-Button-Key">K</kbd>
5757
</>
5858
)}
5959
</span>

packages/docsearch-react/src/Footer.tsx

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -57,32 +57,32 @@ export function Footer({ translations = {} }: FooterProps) {
5757
</div>
5858
<ul className="DocSearch-Commands">
5959
<li>
60-
<span className="DocSearch-Commands-Key">
60+
<kbd className="DocSearch-Commands-Key">
6161
<CommandIcon ariaLabel={selectKeyAriaLabel}>
6262
<path d="M12 3.53088v3c0 1-1 2-2 2H4M7 11.53088l-3-3 3-3" />
6363
</CommandIcon>
64-
</span>
64+
</kbd>
6565
<span className="DocSearch-Label">{selectText}</span>
6666
</li>
6767
<li>
68-
<span className="DocSearch-Commands-Key">
68+
<kbd className="DocSearch-Commands-Key">
6969
<CommandIcon ariaLabel={navigateDownKeyAriaLabel}>
7070
<path d="M7.5 3.5v8M10.5 8.5l-3 3-3-3" />
7171
</CommandIcon>
72-
</span>
73-
<span className="DocSearch-Commands-Key">
72+
</kbd>
73+
<kbd className="DocSearch-Commands-Key">
7474
<CommandIcon ariaLabel={navigateUpKeyAriaLabel}>
7575
<path d="M7.5 11.5v-8M10.5 6.5l-3-3-3 3" />
7676
</CommandIcon>
77-
</span>
77+
</kbd>
7878
<span className="DocSearch-Label">{navigateText}</span>
7979
</li>
8080
<li>
81-
<span className="DocSearch-Commands-Key">
81+
<kbd className="DocSearch-Commands-Key">
8282
<CommandIcon ariaLabel={closeKeyAriaLabel}>
8383
<path d="M13.6167 8.936c-.1065.3583-.6883.962-1.4875.962-.7993 0-1.653-.9165-1.653-2.1258v-.5678c0-1.2548.7896-2.1016 1.653-2.1016.8634 0 1.3601.4778 1.4875 1.0724M9 6c-.1352-.4735-.7506-.9219-1.46-.8972-.7092.0246-1.344.57-1.344 1.2166s.4198.8812 1.3445.9805C8.465 7.3992 8.968 7.9337 9 8.5c.032.5663-.454 1.398-1.4595 1.398C6.6593 9.898 6 9 5.963 8.4851m-1.4748.5368c-.2635.5941-.8099.876-1.5443.876s-1.7073-.6248-1.7073-2.204v-.4603c0-1.0416.721-2.131 1.7073-2.131.9864 0 1.6425 1.031 1.5443 2.2492h-2.956" />
8484
</CommandIcon>
85-
</span>
85+
</kbd>
8686
<span className="DocSearch-Label">{closeText}</span>
8787
</li>
8888
</ul>

0 commit comments

Comments
 (0)