Skip to content

Commit

Permalink
fix: hide keys container on mobile
Browse files Browse the repository at this point in the history
  • Loading branch information
shortcuts committed Jul 23, 2021
1 parent f382763 commit 751d400
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 8 deletions.
7 changes: 2 additions & 5 deletions packages/docsearch-css/src/button.css
Original file line number Diff line number Diff line change
Expand Up @@ -63,11 +63,8 @@
}

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

.DocSearch-Button-Keys,
.DocSearch-Button-Key,
.DocSearch-Button-Placeholder {
display: none;
}
Expand Down
6 changes: 3 additions & 3 deletions packages/docsearch-react/src/DocSearchButton.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import React, { Fragment, useMemo } from 'react';
import React, { useMemo } from 'react';

import { ControlKeyIcon } from './icons/ControlKeyIcon';
import { SearchIcon } from './icons/SearchIcon';
Expand Down Expand Up @@ -49,12 +49,12 @@ export const DocSearchButton = React.forwardRef<

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

0 comments on commit 751d400

Please sign in to comment.