Open History to see the last commit
1import * as React from 'react'
2import { useSearch } from './useSearch'
3β
4export const Search = () => {
5 const { onOpen } = useSearch()
6β
7 return (
8 <div>
9 <button
10 type="button"
11 className="group form-input hover:text-gray-600 hover:border-gray-300 transition duration-150 ease-in-out pointer flex items-center bg-gray-50 text-left w-full text-gray-500 rounded-lg text-sm align-middle"
12 onClick={onOpen}
13 >
14 <svg
15 width="1em"
16 height="1em"
17 className="mr-3 align-middle text-gray-600 flex-shrink-0 group-hover:text-gray-700"
18 style={{
19 marginBottom: 2,
20 }}
21 viewBox="0 0 20 20"
22 >
23 <path
24 d="M14.386 14.386l4.0877 4.0877-4.0877-4.0877c-2.9418 2.9419-7.7115 2.9419-10.6533 0-2.9419-2.9418-2.9419-7.7115 0-10.6533 2.9418-2.9419 7.7115-2.9419 10.6533 0 2.9419 2.9418 2.9419 7.7115 0 10.6533z"
25 stroke="currentColor"
26 fill="none"
27 strokeWidth="2"
28 fillRule="evenodd"
29 strokeLinecap="round"
30 strokeLinejoin="round"
31 ></path>
32 </svg>
33 Search docs
34 <span className="ml-auto invisible lg:visible">
35 <kbd
36 className="border border-gray-300 mr-1 bg-gray-100 align-middle p-0 inline-flex justify-center items-center text-xs text-center mr-0 rounded group-hover:border-gray-300 transition duration-150 ease-in-out "
37 style={{
38 minWidth: '1.8em',
39 }}
40 >
41 β
42 </kbd>
43 <kbd
44 className="border border-gray-300 bg-gray-100 align-middle p-0 inline-flex justify-center items-center text-xs text-center ml-auto mr-0 rounded group-hover:border-gray-300 transition duration-150 ease-in-out "
45 style={{
46 minWidth: '1.8em',
47 }}
48 >
49 K
50 </kbd>
51 </span>
52 </button>
53 </div>
54 )
55}
56Search.displayName = 'Search'