|
1 |
| -import { useState, useCallback, useRef, useEffect } from 'react' |
2 |
| -import { createPortal } from 'react-dom' |
3 |
| -import Link from 'next/link' |
| 1 | +import { DocSearchModal, useDocSearchKeyboardEvents } from '@docsearch/react' |
| 2 | +import { SearchIcon } from '@heroicons/react/outline' |
4 | 3 | import Head from 'next/head'
|
| 4 | +import Link from 'next/link' |
5 | 5 | import { useRouter } from 'next/router'
|
6 |
| -import { DocSearchModal, useDocSearchKeyboardEvents } from '@docsearch/react' |
| 6 | +import { useCallback, useEffect, useRef, useState } from 'react' |
| 7 | +import { createPortal } from 'react-dom' |
7 | 8 |
|
8 | 9 | const ACTION_KEY_DEFAULT = ['Ctrl ', 'Control']
|
9 | 10 | const ACTION_KEY_APPLE = ['⌘', 'Command']
|
@@ -70,20 +71,7 @@ export function Search() {
|
70 | 71 | onClick={onOpen}
|
71 | 72 | className="group flex w-full items-center space-x-3 rounded-md border-2 border-gray-200 bg-gray-100 py-1.5 px-1.5 font-medium leading-6 text-gray-500 hover:text-gray-600 dark:border-gray-600 dark:bg-gray-800 dark:text-gray-400 sm:space-x-4 sm:px-4 lg:px-4"
|
72 | 73 | >
|
73 |
| - <svg |
74 |
| - width="24" |
75 |
| - height="24" |
76 |
| - fill="none" |
77 |
| - className="text-blue-400 transition-colors duration-200 group-hover:text-blue-500" |
78 |
| - > |
79 |
| - <path |
80 |
| - d="M21 21l-6-6m2-5a7 7 0 11-14 0 7 7 0 0114 0z" |
81 |
| - stroke="currentColor" |
82 |
| - strokeWidth="2" |
83 |
| - strokeLinecap="round" |
84 |
| - strokeLinejoin="round" |
85 |
| - /> |
86 |
| - </svg> |
| 74 | + <SearchIcon className="h-6 w-6 text-blue-400 transition-colors duration-200 group-hover:text-blue-500" /> |
87 | 75 | <span>
|
88 | 76 | <span className="md:hidden lg:hidden">Search</span>
|
89 | 77 | <span className="hidden sm:inline">Quick search for anything</span>
|
|
0 commit comments