Skip to content

Commit

Permalink
update:add priority to task card
Browse files Browse the repository at this point in the history
  • Loading branch information
maceteligolden committed Nov 27, 2023
1 parent 8ad78bc commit 61b063a
Showing 1 changed file with 24 additions and 2 deletions.
26 changes: 24 additions & 2 deletions apps/web/lib/components/kanban-card.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ import Image from 'next/image';
import VerticalThreeDot from "@components/ui/svgs/vertical-three-dot";
import { DraggableProvided } from "react-beautiful-dnd";
import CircularProgress from "@components/ui/svgs/circular-progress";
import PriorityIcon from "@components/ui/svgs/priority-icon";

function getStyle(provided: DraggableProvided, style: any) {
if (!style) {
Expand Down Expand Up @@ -74,6 +75,27 @@ const stackImages = (index: number, length: number) => {
}
}

function Priority({
level
}: {
level: number
}) {

const numberArray = Array.from({ length: level }, (_, index) => index + 1);

return(
<>
<div className="flex flex-col">
{numberArray.map((item: any, index: number)=> {
return (
<PriorityIcon key={index}/>
)
})}
</div>
</>
)
}

/**
* card that represent each task
* @param props
Expand Down Expand Up @@ -115,8 +137,8 @@ export default function Item(props: any) {
<BugIcon/>
</span>
<span className="text-grey text-normal mr-1">#213</span>
<span className="text-black dark:text-white text-normal capitalize">{item.content}</span>

<span className="text-black dark:text-white text-normal capitalize mr-2">{item.content}</span>
<Priority level={1}/>
</div>
</div>
<div className="flex flex-col justify-between w-[48px] items-end">
Expand Down

0 comments on commit 61b063a

Please sign in to comment.