<!-- .github/pull_request_template.md --> ## Description <!-- Provide a clear description of the changes in this PR --> ## DCO Affirmation I affirm that all code in every commit of this pull request conforms to the terms of the Topoteretes Developer Certificate of Origin. --------- Co-authored-by: Daulet Amirkhanov <damirkhanov01@gmail.com>
31 lines
674 B
TypeScript
31 lines
674 B
TypeScript
"use client";
|
|
|
|
import { useBoolean } from "@/utils";
|
|
import { Accordion } from "@/ui/elements";
|
|
|
|
interface CogneeInstancesAccordionProps {
|
|
children: React.ReactNode;
|
|
}
|
|
|
|
export default function CogneeInstancesAccordion({
|
|
children,
|
|
}: CogneeInstancesAccordionProps) {
|
|
const {
|
|
value: isInstancesPanelOpen,
|
|
setTrue: openInstancesPanel,
|
|
setFalse: closeInstancesPanel,
|
|
} = useBoolean(true);
|
|
|
|
return (
|
|
<>
|
|
<Accordion
|
|
title={<span>Cognee Instances</span>}
|
|
isOpen={isInstancesPanelOpen}
|
|
openAccordion={openInstancesPanel}
|
|
closeAccordion={closeInstancesPanel}
|
|
>
|
|
{children}
|
|
</Accordion>
|
|
</>
|
|
);
|
|
}
|