forked from CopilotKit/CopilotKit
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathHeader.tsx
More file actions
24 lines (22 loc) · 659 Bytes
/
Copy pathHeader.tsx
File metadata and controls
24 lines (22 loc) · 659 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
import { HeaderProps } from "./props";
import { useChatContext } from "./ChatContext";
import { CopilotDevConsole } from "../dev-console";
import React from "react";
export const Header = ({}: HeaderProps) => {
const { setOpen, icons, labels } = useChatContext();
return (
<div className="copilotKitHeader">
<div>{labels.title}</div>
<div className="copilotKitHeaderControls">
<CopilotDevConsole />
<button
onClick={() => setOpen(false)}
aria-label="Close"
className="copilotKitHeaderCloseButton"
>
{icons.headerCloseIcon}
</button>
</div>
</div>
);
};