-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
cf00ab2
commit 8a0648d
Showing
3 changed files
with
97 additions
and
5 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,11 +1,66 @@ | ||
import useAuxiliaryStore from "@/lib/hooks/stores/useAuxiliaryStore"; | ||
import CourseInfoDisplay from "./courseInfoDisplay/CourseInfoDisplay"; | ||
|
||
export default function LeftPanel() { | ||
type Tab = "info" | "core" | "settings"; | ||
|
||
interface TabButtonProps { | ||
isActive: boolean; | ||
onClick: () => void; | ||
children: React.ReactNode; | ||
} | ||
|
||
function TabButton({ isActive, onClick, children }: TabButtonProps) { | ||
return ( | ||
<div | ||
className="w-1/4 h-full bg-red-100" | ||
<button | ||
onClick={onClick} | ||
className={`flex-1 py-2 px-4 text-sm font-medium ${isActive | ||
? "border-b-2 border-blue-500 text-blue-600" | ||
: "text-gray-500 hover:text-gray-700" | ||
}`} | ||
> | ||
<CourseInfoDisplay /> | ||
{children} | ||
</button> | ||
); | ||
} | ||
|
||
export default function RightPanel() { | ||
const activeTab = useAuxiliaryStore((state) => state.activeTab); | ||
const setActiveTab = useAuxiliaryStore((state) => state.setActiveTab); | ||
|
||
return ( | ||
<div className="w-1/4 h-full bg-white border-l border-gray-200"> | ||
{/* Tab Headers */} | ||
<div className="flex border-b border-gray-200"> | ||
<TabButton | ||
isActive={activeTab === "info"} | ||
onClick={() => setActiveTab("info")} | ||
> | ||
Course Info | ||
</TabButton> | ||
<TabButton | ||
isActive={activeTab === "core"} | ||
onClick={() => setActiveTab("core")} | ||
> | ||
Core | ||
</TabButton> | ||
<TabButton | ||
isActive={activeTab === "settings"} | ||
onClick={() => setActiveTab("settings")} | ||
> | ||
Settings | ||
</TabButton> | ||
</div> | ||
|
||
{/* Tab Content */} | ||
<div className="h-[calc(100%-41px)] overflow-y-auto"> | ||
{activeTab === "info" && <CourseInfoDisplay />} | ||
{activeTab === "core" && ( | ||
<div className="p-4 text-gray-500">Core management coming soon...</div> | ||
)} | ||
{activeTab === "settings" && ( | ||
<div className="p-4 text-gray-500">Settings panel coming soon...</div> | ||
)} | ||
</div> | ||
</div> | ||
); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters