task detail Labels
This commit is contained in:
@@ -1,9 +1,9 @@
|
||||
import { type FC, useEffect, useState } from "react";
|
||||
import DefaulModal from "../../../../components/DefaulModal";
|
||||
import type { Task } from "../../types";
|
||||
import TaskDetailActionBar from "./TaskDetailActionBar";
|
||||
import TaskDetailDescription from "./TaskDetailDescription";
|
||||
import TaskDetailHeader from "./TaskDetailHeader";
|
||||
import TaskDetailToolbar from "./TaskDetailToolbar";
|
||||
import type { TaskDetailTab } from "./types";
|
||||
|
||||
type Props = {
|
||||
@@ -24,6 +24,10 @@ const TaskDetailModal: FC<Props> = ({ open, task, statusLabel, onClose }) => {
|
||||
}
|
||||
}, [open]);
|
||||
|
||||
const handleTabChange = (tab: TaskDetailTab) => {
|
||||
setActiveTab((prev) => (prev === tab ? null : tab));
|
||||
};
|
||||
|
||||
if (!task) return null;
|
||||
|
||||
return (
|
||||
@@ -33,7 +37,7 @@ const TaskDetailModal: FC<Props> = ({ open, task, statusLabel, onClose }) => {
|
||||
<h2 className="mt-6 text-sm font-bold">{task.title}</h2>
|
||||
|
||||
<div className="mt-4">
|
||||
<TaskDetailActionBar activeTab={activeTab} onTabChange={setActiveTab} />
|
||||
<TaskDetailToolbar activeTab={activeTab} onTabChange={handleTabChange} />
|
||||
</div>
|
||||
|
||||
<TaskDetailDescription value={description} onChange={setDescription} />
|
||||
|
||||
Reference in New Issue
Block a user