diff --git a/src/app/WardrobePage/SearchFooter.js b/src/app/WardrobePage/SearchFooter.js
index 2c6e2df..ba13b4b 100644
--- a/src/app/WardrobePage/SearchFooter.js
+++ b/src/app/WardrobePage/SearchFooter.js
@@ -3,6 +3,7 @@ import * as Sentry from "@sentry/react";
import { Box, Flex } from "@chakra-ui/react";
import SearchToolbar, { emptySearchQuery } from "./SearchToolbar";
import { MajorErrorMessage, TestErrorSender, useLocalStorage } from "../util";
+import PaginationToolbar from "../components/PaginationToolbar";
/**
* SearchFooter appears on large screens only, to let you search for new items
@@ -35,8 +36,23 @@ function SearchFooter() {
Add new items:
-
-
+
+
+
+
+ alert("TODO")}
+ buildPageUrl={() => null}
+ size="sm"
+ />
+
diff --git a/src/app/WardrobePage/SearchToolbar.js b/src/app/WardrobePage/SearchToolbar.js
index f30cd2b..eeaac4d 100644
--- a/src/app/WardrobePage/SearchToolbar.js
+++ b/src/app/WardrobePage/SearchToolbar.js
@@ -35,6 +35,17 @@ export function searchQueryIsEmpty(query) {
return Object.values(query).every((value) => !value);
}
+const SUGGESTIONS_PLACEMENT_PROPS = {
+ inline: {
+ borderBottomRadius: "md",
+ },
+ top: {
+ position: "absolute",
+ bottom: "100%",
+ borderTopRadius: "md",
+ },
+};
+
/**
* SearchToolbar is rendered above both the ItemsPanel and the SearchPanel,
* and contains the search field where the user types their query.
@@ -53,6 +64,7 @@ function SearchToolbar({
showItemsLabel = false,
background = null,
boxShadow = null,
+ suggestionsPlacement = "inline",
...props
}) {
const [suggestions, setSuggestions] = React.useState([]);
@@ -84,7 +96,7 @@ function SearchToolbar({
}
};
- const suggestionBgColor = useColorModeValue("transparent", "whiteAlpha.100");
+ const suggestionBgColor = useColorModeValue("white", "whiteAlpha.100");
const highlightedBgColor = useColorModeValue("gray.100", "whiteAlpha.300");
const renderSuggestion = React.useCallback(
@@ -110,11 +122,11 @@ function SearchToolbar({
{({ css, cx }) => (
{children}
{!children && advancedSearchIsOpen && (
@@ -140,7 +153,7 @@ function SearchToolbar({
);
},
- [advancedSearchIsOpen]
+ [advancedSearchIsOpen, suggestionsPlacement]
);
// When we change the query filters, clear out the suggestions.
@@ -183,7 +196,7 @@ function SearchToolbar({
const focusBorderColor = useColorModeValue("green.600", "green.400");
return (
-
+
{
diff --git a/src/app/components/PaginationToolbar.js b/src/app/components/PaginationToolbar.js
index 4c0b8de..ecafc8a 100644
--- a/src/app/components/PaginationToolbar.js
+++ b/src/app/components/PaginationToolbar.js
@@ -9,6 +9,7 @@ function PaginationToolbar({
currentPageNumber,
goToPageNumber,
buildPageUrl,
+ size = "md",
...props
}) {
const pagesAreLoaded = currentPageNumber != null && numTotalPages != null;
@@ -32,11 +33,12 @@ function PaginationToolbar({
opacity: 0.4,
}}
isDisabled={!hasPrevPage}
+ size={size}
>
← Prev
{numTotalPages > 0 && (
-
+
Page
Next →