diff --git a/beta/src/components/Search.tsx b/beta/src/components/Search.tsx index abafaefaf2a..892c6120732 100644 --- a/beta/src/components/Search.tsx +++ b/beta/src/components/Search.tsx @@ -28,11 +28,14 @@ function Hit({hit, children}: any) { ); } -function Kbd(props: {children?: React.ReactNode}) { +function Kbd(props: {children?: React.ReactNode; wide?: boolean}) { + const {wide, ...rest} = props; + const width = wide ? 'w-12' : 'w-6'; + return ( ); } @@ -94,7 +97,9 @@ const options = { apiKey: siteConfig.algolia.apiKey, indexName: siteConfig.algolia.indexName, }; + let DocSearchModal: any = null; + export function Search({ searchParameters = { hitsPerPage: 5, @@ -160,7 +165,10 @@ export function Search({ Search - + + + Ctrl + K diff --git a/beta/src/pages/_document.tsx b/beta/src/pages/_document.tsx index 9e37d6c6194..c5dac6d46c3 100644 --- a/beta/src/pages/_document.tsx +++ b/beta/src/pages/_document.tsx @@ -53,6 +53,19 @@ const MyDocument = () => { `, }} /> +
diff --git a/beta/src/styles/index.css b/beta/src/styles/index.css index a5c32b1875a..95dc4b39b8e 100644 --- a/beta/src/styles/index.css +++ b/beta/src/styles/index.css @@ -212,6 +212,17 @@ } } +/** + * Hide all content that's relevant only to a specific platform + */ +html.platform-mac [data-platform='win'] { + display: none; +} + +html.platform-win [data-platform='mac'] { + display: none; +} + .code-step * { color: inherit !important; }