Skip to content
Merged
Show file tree
Hide file tree
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 3 additions & 5 deletions packages/docsearch-css/src/button.css
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,7 @@

.DocSearch-Button-Keys {
display: flex;
width: calc(2 * 20px + 2 * 0.4em);
Comment thread
shortcuts marked this conversation as resolved.
Outdated
}

.DocSearch-Button-Key {
Expand All @@ -62,11 +63,8 @@
}

@media (max-width: 750px) {
.DocSearch-Button-KeySeparator,
.DocSearch-Button-Key {
display: none;
}

.DocSearch-Button-Keys,
.DocSearch-Button-Key,
Comment thread
shortcuts marked this conversation as resolved.
Outdated
.DocSearch-Button-Placeholder {
display: none;
}
Expand Down
18 changes: 10 additions & 8 deletions packages/docsearch-react/src/DocSearchButton.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -47,14 +47,16 @@ export const DocSearchButton = React.forwardRef<
<span className="DocSearch-Button-Placeholder">{buttonText}</span>
</span>

{key !== null && (
<span className="DocSearch-Button-Keys">
<span className="DocSearch-Button-Key">
{key === ACTION_KEY_DEFAULT ? <ControlKeyIcon /> : key}
</span>
<span className="DocSearch-Button-Key">K</span>
</span>
)}
<span className="DocSearch-Button-Keys">
{key !== null && (
<>
<span className="DocSearch-Button-Key">
{key === ACTION_KEY_DEFAULT ? <ControlKeyIcon /> : key}
</span>
<span className="DocSearch-Button-Key">K</span>
</>
)}
</span>
</button>
);
});