popup not working yet need to resolve bug

This commit is contained in:
anovazzi1 2023-02-09 18:56:46 -03:00
commit 34121f8580
7 changed files with 150 additions and 27 deletions

View file

@ -1,15 +1,22 @@
import { Handle, Position } from 'reactflow';
import { Handle, Position } from "reactflow";
export default function PromptNode({data}){
console.log(data.template)
return(
<div
className='prompt-Node relative bg-white h-16 w-40 border rounded-sm solid border-black flex flex-col justify-center'>
<Handle type='target' position={Position.Left}></Handle>
<label className='absolute text-sm -top-3 left-1 bg-white w-14 text-center'> Prompt</label>
<div className='w-full h-10 truncate bg-slate-50 text-xs'> {data.template}</div>
<Handle type='source' position={Position.Right}></Handle>
</div>
)
}
export default function PromptNode({ data }) {
console.log(data)
return (
<div
onClick={()=>data.onClick()}
className="prompt-Node relative bg-white h-16 w-40 border rounded-sm solid border-black flex flex-col justify-center"
>
<Handle type="target" position={Position.Left}></Handle>
<label className="absolute cursor-grab text-sm -top-3 left-1 bg-white w-14 text-center">
{" "}
Prompt
</label>
<div className="w-full h-10 truncate bg-slate-50 text-xs">
{" "}
{data.template}
</div>
<Handle type="source" position={Position.Right}></Handle>
</div>
);
}