mirror of
https://github.com/browseros-ai/BrowserOS.git
synced 2026-05-22 13:25:14 +00:00
git-subtree-dir: packages/browseros-agent git-subtree-mainline:8f148d0918git-subtree-split:90bd4be300
30 lines
582 B
TypeScript
30 lines
582 B
TypeScript
import type { ConnectionLineComponent } from '@xyflow/react'
|
|
|
|
const HALF = 0.5
|
|
|
|
/** @public */
|
|
export const Connection: ConnectionLineComponent = ({
|
|
fromX,
|
|
fromY,
|
|
toX,
|
|
toY,
|
|
}) => (
|
|
<g>
|
|
<path
|
|
className="animated"
|
|
d={`M${fromX},${fromY} C ${fromX + (toX - fromX) * HALF},${fromY} ${fromX + (toX - fromX) * HALF},${toY} ${toX},${toY}`}
|
|
fill="none"
|
|
stroke="var(--color-ring)"
|
|
strokeWidth={1}
|
|
/>
|
|
<circle
|
|
cx={toX}
|
|
cy={toY}
|
|
fill="#fff"
|
|
r={3}
|
|
stroke="var(--color-ring)"
|
|
strokeWidth={1}
|
|
/>
|
|
</g>
|
|
)
|