({
style = {
height: "100vh",
width: "100%",
},
}: {
style?: React.CSSProperties;
dom?: import("expo/dom").DOMProps;
})
| 265 | }; |
| 266 | |
| 267 | const Flow = ({ |
| 268 | style = { |
| 269 | height: "100vh", |
| 270 | width: "100%", |
| 271 | }, |
| 272 | }: { |
| 273 | style?: React.CSSProperties; |
| 274 | dom?: import("expo/dom").DOMProps; |
| 275 | }) => { |
| 276 | const [nodes, setNodes, onNodesChange] = useNodesState(initialNodes); |
| 277 | const [edges, setEdges, onEdgesChange] = useEdgesState(initialEdges); |
| 278 | |
| 279 | const onConnect = useCallback( |
| 280 | (params) => setEdges((els) => addEdge(params, els)), |
| 281 | [] |
| 282 | ); |
| 283 | |
| 284 | return ( |
| 285 | <div style={style}> |
| 286 | <ReactFlow |
| 287 | nodes={nodes} |
| 288 | edges={edges} |
| 289 | onNodesChange={(props) => { |
| 290 | // console.log(props[0]); |
| 291 | onNodesChange(props); |
| 292 | }} |
| 293 | onEdgesChange={onEdgesChange} |
| 294 | onConnect={onConnect} |
| 295 | fitView |
| 296 | nodeTypes={nodeTypes} |
| 297 | edgeTypes={edgeTypes} |
| 298 | defaultEdgeOptions={defaultEdgeOptions} |
| 299 | > |
| 300 | <Background /> |
| 301 | <svg> |
| 302 | <defs> |
| 303 | <linearGradient id="edge-gradient"> |
| 304 | <stop offset="0%" stopColor="#9394a0" /> |
| 305 | <stop offset="100%" stopColor="#9394a0" /> |
| 306 | </linearGradient> |
| 307 | |
| 308 | <marker |
| 309 | id="edge-circle" |
| 310 | viewBox="-5 -5 10 10" |
| 311 | refX="0" |
| 312 | refY="0" |
| 313 | markerUnits="strokeWidth" |
| 314 | markerWidth="10" |
| 315 | markerHeight="10" |
| 316 | orient="auto" |
| 317 | > |
| 318 | <circle |
| 319 | stroke="#9394a0" |
| 320 | strokeOpacity="0.75" |
| 321 | r="2" |
| 322 | cx="0" |
| 323 | cy="0" |
| 324 | /> |
nothing calls this directly
no outgoing calls
no test coverage detected