diff --git a/compass/components/FilterBox/ContainsDropdown.tsx b/compass/components/FilterBox/ContainsDropdown.tsx
new file mode 100644
index 0000000..1d942e4
--- /dev/null
+++ b/compass/components/FilterBox/ContainsDropdown.tsx
@@ -0,0 +1,53 @@
+import { useState } from "react";
+import { ChevronDownIcon } from "@heroicons/react/24/solid";
+
+const mockTags = ["food relief", "period poverty", "nutrition education"];
+
+type FilterType = "contains" | "does not contain" | "is empty" | "is not empty";
+
+export const ContainsDropdown = ({
+ isDropdownOpen,
+ setIsDropdownOpen,
+ filterType,
+ setFilterType,
+}) => {
+ const handleFilterTypeChange = (type: FilterType) => {
+ setFilterType(type);
+ setIsDropdownOpen(false);
+ };
+
+ return (
+
+
+
handleFilterTypeChange("contains")}
+ >
+ Contains
+
+
handleFilterTypeChange("does not contain")}
+ >
+ Does not contain
+
+
handleFilterTypeChange("is empty")}
+ >
+ Is empty
+
+
handleFilterTypeChange("is not empty")}
+ >
+ Is not empty
+
+
+
+ );
+};
\ No newline at end of file
diff --git a/compass/components/FilterBox.tsx b/compass/components/FilterBox/index.tsx
similarity index 60%
rename from compass/components/FilterBox.tsx
rename to compass/components/FilterBox/index.tsx
index a38574c..ce1e958 100644
--- a/compass/components/FilterBox.tsx
+++ b/compass/components/FilterBox/index.tsx
@@ -1,11 +1,17 @@
// FilterBox.tsx
import { useState } from "react";
+import { ChevronDownIcon } from "@heroicons/react/24/solid";
+import { ContainsDropdown } from "./ContainsDropdown";
const mockTags = ["food relief", "period poverty", "nutrition education"];
+type FilterType = "contains" | "does not contain" | "is empty" | "is not empty";
+
export const FilterBox = () => {
const [selectedTags, setSelectedTags] = useState([]);
const [searchTerm, setSearchTerm] = useState("");
+ const [showContainsDropdown, setShowContainsDropdown] = useState(false);
+ const [filterType, setFilterType] = useState("contains");
const handleTagChange = (tag: string) => {
setSelectedTags((prevTags) =>
@@ -38,18 +44,24 @@ export const FilterBox = () => {
return (
+ {showContainsDropdown && (
+
+ )}
);
};
diff --git a/compass/components/Table/TableAction.tsx b/compass/components/Table/TableAction.tsx
index 737b95a..852c3a4 100644
--- a/compass/components/Table/TableAction.tsx
+++ b/compass/components/Table/TableAction.tsx
@@ -1,7 +1,7 @@
// TableAction.tsx
import { MagnifyingGlassIcon } from "@heroicons/react/24/solid";
import { ChangeEventHandler, FunctionComponent, useRef, useState } from "react";
-import { FilterBox } from "../../components/FilterBox";
+import { FilterBox } from "../FilterBox";
type TableActionProps = {
query: string;