diff --git a/components/Dashboard/LinkItem.tsx b/components/Dashboard/LinkItem.tsx index cab9461..b3ff801 100644 --- a/components/Dashboard/LinkItem.tsx +++ b/components/Dashboard/LinkItem.tsx @@ -85,7 +85,7 @@ export default function ({ link, count }: Props) {
- +

{link.collection.name}

diff --git a/components/Dropdown.tsx b/components/Dropdown.tsx index 7412b7c..58e71b7 100644 --- a/components/Dropdown.tsx +++ b/components/Dropdown.tsx @@ -24,7 +24,7 @@ export default function Dropdown({ onClickOutside, className, items }: Props) { return ( {items.map((e, i) => { const inner = ( diff --git a/components/FilterSearchDropdown.tsx b/components/FilterSearchDropdown.tsx new file mode 100644 index 0000000..fc99546 --- /dev/null +++ b/components/FilterSearchDropdown.tsx @@ -0,0 +1,57 @@ +import React, { SetStateAction } from "react"; +import ClickAwayHandler from "./ClickAwayHandler"; +import Checkbox from "./Checkbox"; +import { SearchSettings } from "@/types/global"; + +type Props = { + setFilterDropdown: (value: SetStateAction) => void; + toggleCheckbox: ( + name: "name" | "title" | "url" | "collection" | "tags" + ) => void; + searchSettings: SearchSettings; +}; + +export default function FilterSearchDropdown({ + setFilterDropdown, + toggleCheckbox, + searchSettings, +}: Props) { + return ( + { + const target = e.target as HTMLInputElement; + if (target.id !== "filter-dropdown") setFilterDropdown(false); + }} + className="absolute top-8 right-0 shadow-md bg-gray-50 rounded-md p-2 z-20 w-40" + > +

Filter by

+
+ toggleCheckbox("name")} + /> + toggleCheckbox("url")} + /> + toggleCheckbox("title")} + /> + toggleCheckbox("collection")} + /> + toggleCheckbox("tags")} + /> +
+
+ ); +} diff --git a/components/LinkList.tsx b/components/LinkList.tsx index 99e580b..2ab9fec 100644 --- a/components/LinkList.tsx +++ b/components/LinkList.tsx @@ -78,22 +78,26 @@ export default function ({ link, count }: Props) {
-

{count + 1}.

+

{count + 1}.

{link.name}

{link.title}

- +

{link.collection.name}

-
+
{link.tags.map((e, i) => ( -

+

{e.name}

diff --git a/components/Modal/ChangePassword.tsx b/components/Modal/ChangePassword.tsx index 43356e0..89635e1 100644 --- a/components/Modal/ChangePassword.tsx +++ b/components/Modal/ChangePassword.tsx @@ -34,7 +34,7 @@ export default function ChangePassword({

Change Password

-

Old Password

+

Old Password

-

New Password

+

New Password

-

Re-enter New Password

+

Re-enter New Password

Save diff --git a/components/Modal/Collection/CollectionInfo.tsx b/components/Modal/Collection/CollectionInfo.tsx index 202e812..66546c8 100644 --- a/components/Modal/Collection/CollectionInfo.tsx +++ b/components/Modal/Collection/CollectionInfo.tsx @@ -47,7 +47,7 @@ export default function CollectionInfo({
-

+

Name

@@ -63,9 +63,7 @@ export default function CollectionInfo({ />
-

- Icon Color -

+

Icon Color

- setCollection({ ...collection, color: "#7dd3fc" }) + setCollection({ ...collection, color: "#0ea5e9" }) } > Reset @@ -90,7 +88,7 @@ export default function CollectionInfo({
-

Description

+

Description