Skip to content

Update Search Component #60

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Dec 6, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions src/components/Search.js
Original file line number Diff line number Diff line change
Expand Up @@ -68,13 +68,13 @@ export function Search() {
type="button"
ref={searchButtonRef}
onClick={onOpen}
className="group leading-6 font-medium flex items-center space-x-3 sm:space-x-4 hover:text-gray-600 transition-colors duration-200 w-full py-2"
className="group leading-6 font-medium flex items-center space-x-3 sm:space-x-4 bg-gray-100 hover:text-gray-600 transition-colors duration-200 w-full py-1.5 px-1.5 sm:px-4 lg:px-4 rounded-lg border-2 border-gray-200"
>
<svg
width="24"
height="24"
fill="none"
className="text-gray-400 group-hover:text-gray-500 transition-colors duration-200"
className="text-blue-400 group-hover:text-blue-500 transition-colors duration-200"
>
<path
d="M21 21l-6-6m2-5a7 7 0 11-14 0 7 7 0 0114 0z"
Expand All @@ -89,7 +89,7 @@ export function Search() {
</span>
<span
style={{ opacity: browserDetected ? '1' : '0' }}
className="hidden sm:block text-gray-400 text-sm leading-5 py-0.5 px-1.5 border border-gray-300 rounded-md"
className="hidden sm:block text-gray-500 text-sm leading-5 py-0.5 px-1.5 border border-gray-400 rounded-md"
>
<span className="sr-only">Press </span>
<kbd className="font-sans">
Expand Down
51 changes: 46 additions & 5 deletions src/css/docsearch.css
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@
display: flex;
flex-direction: column;
min-height: 0;
border-radius: 1rem;
border-radius: 0.7rem;
box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
background: white;
}
Expand Down Expand Up @@ -313,16 +313,20 @@
}

.DocSearch-Footer {
align-items: center;
flex: none;
display: flex;
justify-content: flex-end;
margin: 0 1.5rem;
border-top: 1px solid theme('colors.gray.200');
padding: 1.25rem 0;
}

.DocSearch-Commands {
display: none;
flex-direction: row-reverse;
position: relative;
flex-shrink: 0;
-webkit-user-select: none;
-ms-user-select: none;
user-select: none;
justify-content: space-between;
}

.DocSearch-Logo a {
Expand All @@ -338,6 +342,37 @@
margin-left: 0.5rem;
}

.DocSearch-Commands {
color: theme('colors.gray.500');
display: flex;
list-style: none;
margin: 0;
padding: 0;
font-size: 0.75rem;
}

.DocSearch-Commands li {
align-items: center;
display: flex;
}

.DocSearch-Commands li:not(:last-of-type) {
margin-right: 0.8em;
}

.DocSearch-Commands-Key {
align-items: center;
background: theme('colors.gray.200');
border-radius: 2px;
box-shadow: theme('colors.gray.600');
display: flex;
height: 18px;
justify-content: center;
margin-right: 0.4em;
padding-bottom: 1px;
width: 20px;
}

.DocSearch-Hit--deleting,
.DocSearch-Hit--favoriting {
opacity: 0;
Expand Down Expand Up @@ -401,3 +436,9 @@
color: theme('colors.blue.700');
font-weight: 500;
}

@media (max-width: 500px) {
.DocSearch-Commands {
display: none;
}
}
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy