Skip to content

Commit 262fc88

Browse files
authored
Merge pull request #791 from rvsia/fixAlgoliaOnMobiles
Fix algolia search on mobile screens
2 parents b3ddea5 + 79ed98a commit 262fc88

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

packages/react-renderer-demo/src/components/docsearch.js

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ import Search from '@material-ui/icons/Search';
66
import docsearch from 'docsearch.js';
77
import { useRouter } from 'next/router';
88

9-
const useStyles = makeStyles(() => ({
9+
const useStyles = makeStyles((theme) => ({
1010
docSearchWrapper: {
1111
marginRight: 16,
1212
'& .algolia-docsearch-suggestion.algolia-docsearch-suggestion__main.algolia-docsearch-suggestion__secondary': {
@@ -16,6 +16,12 @@ const useStyles = makeStyles(() => ({
1616
marginBottom: 0
1717
},
1818
'& .ds-dropdown-menu': {
19+
[theme.breakpoints.down('sm')]: {
20+
position: 'fixed !important',
21+
top: '50px !important',
22+
maxWidth: '100% !important',
23+
minWidth: '100%'
24+
},
1925
'& [class^=ds-dataset-]': {
2026
borderRadius: 0
2127
},

0 commit comments

Comments
 (0)