Tooltips added to match the types
This commit is contained in:
parent
29dbc3ff31
commit
7796450365
3 changed files with 44 additions and 21 deletions
|
|
@ -2,23 +2,29 @@ import { ChatBubbleBottomCenterTextIcon } from "@heroicons/react/24/outline";
|
|||
import { Handle, Position } from "reactflow";
|
||||
import Input from "../../components/inputComponent";
|
||||
import { snakeToNormalCase } from "../../utils";
|
||||
import Tooltip from "../../components/TooltipComponent";
|
||||
|
||||
export default function ChatOutputNode({ data }) {
|
||||
|
||||
return (
|
||||
<div className="prompt-node relative rounded-lg solid border flex justify-center align-center py-3 px-6 bg-blue-600">
|
||||
return (
|
||||
<div className="prompt-node relative rounded-lg solid border flex justify-center align-center py-3 px-6 bg-blue-600">
|
||||
<Tooltip title="Message: str">
|
||||
<Handle
|
||||
type="source"
|
||||
isConnectable={false}
|
||||
isValidConnection={({ sourceHandle, targetHandle }) =>
|
||||
targetHandle === sourceHandle ||
|
||||
data.types[targetHandle] === sourceHandle ||
|
||||
sourceHandle === "str"
|
||||
}
|
||||
position={Position.Left}
|
||||
id="str"
|
||||
className="ml-1 bg-transparent border-solid border-l-8 border-l-white border-y-transparent border-y-8 border-r-0 rounded-none"
|
||||
></Handle>
|
||||
<div className="flex gap-3 text-lg font-medium text-white items-center">
|
||||
Output
|
||||
<ChatBubbleBottomCenterTextIcon className="h-8 w-8 mt-1" />
|
||||
</div>
|
||||
</div>
|
||||
);
|
||||
</Tooltip>
|
||||
|
||||
}
|
||||
<div className="flex gap-3 text-lg font-medium text-white items-center">
|
||||
Output
|
||||
<ChatBubbleBottomCenterTextIcon className="h-8 w-8 mt-1" />
|
||||
</div>
|
||||
</div>
|
||||
);
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue