diff --git a/src/components/ui/table.tsx b/src/components/ui/table.tsx
new file mode 100644
index 0000000..51b74dd
--- /dev/null
+++ b/src/components/ui/table.tsx
@@ -0,0 +1,116 @@
+"use client"
+
+import * as React from "react"
+
+import { cn } from "@/lib/utils"
+
+function Table({ className, ...props }: React.ComponentProps<"table">) {
+ return (
+
tr]:last:border-b-0",
+ className
+ )}
+ {...props}
+ />
+ )
+}
+
+function TableRow({ className, ...props }: React.ComponentProps<"tr">) {
+ return (
+
+ )
+}
+
+function TableHead({ className, ...props }: React.ComponentProps<"th">) {
+ return (
+ [role=checkbox]]:translate-y-[2px]",
+ className
+ )}
+ {...props}
+ />
+ )
+}
+
+function TableCell({ className, ...props }: React.ComponentProps<"td">) {
+ return (
+ | [role=checkbox]]:translate-y-[2px]",
+ className
+ )}
+ {...props}
+ />
+ )
+}
+
+function TableCaption({
+ className,
+ ...props
+}: React.ComponentProps<"caption">) {
+ return (
+
+ )
+}
+
+export {
+ Table,
+ TableHeader,
+ TableBody,
+ TableFooter,
+ TableHead,
+ TableRow,
+ TableCell,
+ TableCaption,
+}
diff --git a/src/components/view/TaskView.tsx b/src/components/view/TaskView.tsx
index 5dd61fa..e3c334e 100644
--- a/src/components/view/TaskView.tsx
+++ b/src/components/view/TaskView.tsx
@@ -4,24 +4,27 @@ import { SetState, Task } from "@/lib/types";
import { Color } from "@/lib/ui/color";
import BoardView from "./board/BoardView";
import { Tabs, TabsContent, TabsList, TabsTrigger } from "../ui/tabs";
+import { TableView } from "./table/TableView";
+
+export type TaskViewProps = {
+ tags: Record;
+ tasks: Task[];
+ setTasks: SetState;
+ createTask: (status: string) => void;
+};
export default function TaskView({
tags,
tasks,
setTasks,
createTask,
-}: {
- tags: Record;
- tasks: Task[];
- setTasks: SetState;
- createTask: (status: string) => void;
-}) {
+}: TaskViewProps) {
return (
Board
- List
+ Table
-
-
+ = {
+const statusLabels: Record = {
todo: "To do",
inprogress: "In progress",
done: "Done",
@@ -19,12 +18,7 @@ export default function BoardView({
tasks,
setTasks,
createTask,
-}: {
- tags: Record;
- tasks: Task[];
- setTasks: SetState;
- createTask: (status: string) => void;
-}) {
+}: TaskViewProps) {
function onDragEnd(result: any) {
const { draggableId, source, destination } = result;
if (!destination) return;
@@ -56,7 +50,7 @@ export default function BoardView({
- {Object.keys(columnLabels).map((status) => (
+ {Object.keys(statusLabels).map((status) => (
{(provided) => (
- {columnLabels[status]}
+ {statusLabels[status]}
|