From e0c3318c09c6d8158e51d09e88eae32bb26f7bb7 Mon Sep 17 00:00:00 2001
From: Jonathan Neal <jonathantneal@hotmail.com>
Date: Thu, 11 Nov 2021 12:09:48 -0500
Subject: Update Astro docs to use v0.21 (#1738)

* update docs site to leverage astro v0.21

* fix resolutions

* fix docsearch import

* Resolve `@docsearch/react` is a cross-execution-context-friendly way

* chore: update astro version

* fix: remove line highlighting syntax

* fix: braces inside of attr string

* Match current astro version

* Trim leading newline in MainLayout.astro template

* Move card grid styles into Layout

Co-authored-by: Nate Moore <nate@skypack.dev>
---
 docs/src/components/Header/Search.tsx | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)

(limited to 'docs/src/components/Header/Search.tsx')

diff --git a/docs/src/components/Header/Search.tsx b/docs/src/components/Header/Search.tsx
index 7b8532a81..4ca7b4ef1 100644
--- a/docs/src/components/Header/Search.tsx
+++ b/docs/src/components/Header/Search.tsx
@@ -1,10 +1,12 @@
 /* jsxImportSource: react */
 import { useState, useCallback, useRef } from 'react';
 import { createPortal } from 'react-dom';
-import { DocSearchModal, useDocSearchKeyboardEvents } from '@docsearch/react';
-import '@docsearch/css//dist/style.css';
+import * as docsearch from '@docsearch/react';
+import '@docsearch/css/dist/style.css';
 import './Search.css';
 
+const { DocSearchModal, useDocSearchKeyboardEvents } = ((docsearch as unknown as { default: typeof docsearch }).default || docsearch)
+
 export default function Search(props) {
   const [isOpen, setIsOpen] = useState(false);
   const searchButtonRef = useRef();
-- 
cgit v1.2.3

