Elffuss BraidHub

kikocis/continue public

9875eaa07e45 · 867 BRawPermalink
1import { useLump } from "./LumpContext";
2import { LumpToolbar } from "./LumpToolbar/LumpToolbar";
3import { SelectedSection } from "./sections/SelectedSection";
4
5/**
6 * Internal component that consumes the LumpContext
7 */
8export function Lump() {
9 const { isLumpVisible, selectedSection } = useLump();
10
11 return (
12 <div className="bg-input rounded-t-default border-command-border mx-1.5 border-l border-r border-t">
13 <div className="xs:px-2 px-1 py-0.5">
14 <LumpToolbar />
15
16 <div
17 className={`no-scrollbar overflow-y-auto pr-0.5 transition-all duration-300 ease-in-out ${
18 selectedSection
19 ? "my-1 max-h-[200px] opacity-100"
20 : "my-0 max-h-0 opacity-0"
21 } ${isLumpVisible ? "opacity-100" : "opacity-0"}`}
22 >
23 <SelectedSection />
24 </div>
25 </div>
26 </div>
27 );
28}