diff --git a/src/components/Dropdown.tsx b/src/components/Dropdown.tsx index b0fc53a4..f6e4b920 100644 --- a/src/components/Dropdown.tsx +++ b/src/components/Dropdown.tsx @@ -4,13 +4,13 @@ export default function Dropdown({ items, children, }: { - items: { label: string; action: () => void }[]; + items: { label: string; action: () => void; icon?: React.ReactNode }[]; children: React.ReactNode; }) { return (
- + {children}
@@ -24,14 +24,15 @@ export default function Dropdown({ leaveFrom="transform opacity-100 scale-100" leaveTo="transform opacity-0 scale-95" > - -
+ +
{items.map((item) => ( diff --git a/src/components/FeedbackButton.tsx b/src/components/FeedbackButton.tsx index 1ad26bc0..72323367 100644 --- a/src/components/FeedbackButton.tsx +++ b/src/components/FeedbackButton.tsx @@ -19,7 +19,7 @@ const FeedbackButton: React.FC = () => { - - setSelectedPublicListId(list.publicId) - } - /> +
+ openNewCardForm(list.publicId), + icon: ( + + ), + }, + { + label: "Delete list", + action: handleOpenDeleteListConfirmation, + icon: ( + + ), + }, + ]} + > + + +
{children} diff --git a/src/views/board/components/ListDropdown.tsx b/src/views/board/components/ListDropdown.tsx deleted file mode 100644 index 8114fd7c..00000000 --- a/src/views/board/components/ListDropdown.tsx +++ /dev/null @@ -1,52 +0,0 @@ -import { Fragment } from "react"; -import { Menu, Transition } from "@headlessui/react"; -import { HiEllipsisHorizontal } from "react-icons/hi2"; -import { useModal } from "~/providers/modal"; - -interface ListDropdownProps { - setSelectedPublicListId: () => void; -} - -export default function ListDropdown({ - setSelectedPublicListId, -}: ListDropdownProps) { - const { openModal } = useModal(); - - const handleOpenDeleteListConfirmation = () => { - setSelectedPublicListId(); - openModal("DELETE_LIST"); - }; - - return ( - -
- - - -
- - - -
- - - -
-
-
-
- ); -} diff --git a/src/views/board/index.tsx b/src/views/board/index.tsx index 791ab63f..4cf7ef77 100644 --- a/src/views/board/index.tsx +++ b/src/views/board/index.tsx @@ -16,7 +16,6 @@ import { formatToArray } from "~/utils/helpers"; import { useBoard } from "~/providers/board"; import { useModal } from "~/providers/modal"; import { useWorkspace } from "~/providers/workspace"; - import { PageHead } from "~/components/PageHead"; import Modal from "~/components/modal"; import PatternedBackground from "~/components/PatternedBackground"; @@ -147,7 +146,7 @@ export default function BoardPage() {
{isLoading ? (
-
+
) : (
{isLoading ? (
-
-
-
+
+
+
) : ( @@ -236,7 +235,7 @@ export default function BoardPage() { }} key={card.publicId} href={`/cards/${card.publicId}`} - className={`mb-2 flex !cursor-pointer flex-col rounded-md border border-light-200 bg-light-50 px-3 py-2 text-sm text-neutral-900 dark:border-dark-200 dark:bg-dark-300 dark:text-dark-1000 dark:hover:bg-dark-400 ${ + className={`mb-2 flex !cursor-pointer flex-col rounded-md border border-light-200 bg-light-50 px-3 py-2 text-sm text-neutral-900 dark:border-dark-200 dark:bg-dark-200 dark:text-dark-1000 dark:hover:bg-dark-300 ${ card.publicId.startsWith("PLACEHOLDER") ? "pointer-events-none" : "" diff --git a/src/views/boards/components/BoardsList.tsx b/src/views/boards/components/BoardsList.tsx index a914f997..22a94aba 100644 --- a/src/views/boards/components/BoardsList.tsx +++ b/src/views/boards/components/BoardsList.tsx @@ -15,9 +15,9 @@ export function BoardsList() { if (isLoading) return (
-
-
-
+
+
+
); @@ -27,7 +27,7 @@ export function BoardsList() {
{data?.map((board) => ( -
+

{board.name} diff --git a/src/views/card/components/Comment.tsx b/src/views/card/components/Comment.tsx index b774d502..69636178 100644 --- a/src/views/card/components/Comment.tsx +++ b/src/views/card/components/Comment.tsx @@ -9,7 +9,7 @@ import { usePopup } from "~/providers/popup"; import Avatar from "~/components/Avatar"; import Button from "~/components/Button"; import Dropdown from "~/components/Dropdown"; -import { HiEllipsisHorizontal } from "react-icons/hi2"; +import { HiEllipsisHorizontal, HiPencil } from "react-icons/hi2"; interface FormValues { comment: string; @@ -69,7 +69,7 @@ const Comment = ({ return (

@@ -96,16 +96,19 @@ const Comment = ({

- setIsEditing(true), - }, - ]} - > - - +
+ setIsEditing(true), + icon: , + }, + ]} + > + + +
{!isEditing ? (

{comment}

diff --git a/src/views/card/components/NewCommentForm.tsx b/src/views/card/components/NewCommentForm.tsx index cb3213d3..e0c85848 100644 --- a/src/views/card/components/NewCommentForm.tsx +++ b/src/views/card/components/NewCommentForm.tsx @@ -43,7 +43,7 @@ const NewCommentForm = ({ cardPublicId }: { cardPublicId: string }) => { return ( {
-
+

Activity