initial boilerplate
This commit is contained in:
25
src/components/CustomNode.tsx
Normal file
25
src/components/CustomNode.tsx
Normal file
@@ -0,0 +1,25 @@
|
||||
import React from 'react'
|
||||
import { Handle, Position } from 'reactflow'
|
||||
|
||||
export default function CustomNode({ data }: any) {
|
||||
return (
|
||||
<div className="p-3 rounded-lg bg-white shadow-md border border-gray-200 w-48">
|
||||
<div className="text-sm font-medium mb-2">{data.label}</div>
|
||||
<div className="text-xs text-gray-500">Custom content</div>
|
||||
|
||||
<Handle
|
||||
type="target"
|
||||
position={Position.Left}
|
||||
id="a"
|
||||
style={{ background: '#10B981', width: 10, height: 10 }}
|
||||
/>
|
||||
|
||||
<Handle
|
||||
type="source"
|
||||
position={Position.Right}
|
||||
id="b"
|
||||
style={{ background: '#3B82F6', width: 10, height: 10 }}
|
||||
/>
|
||||
</div>
|
||||
)
|
||||
}
|
||||
Reference in New Issue
Block a user