refactor(examples): switch examples from cra to nextjs

This commit is contained in:
Christopher Möller
2022-07-19 17:23:26 +02:00
parent 62c417263c
commit be4dd6f1fa
86 changed files with 755 additions and 45859 deletions
@@ -0,0 +1,31 @@
import React, { FC } from 'react';
import { ConnectionLineComponentProps } from '@react-flow/core';
const ConnectionLine: FC<ConnectionLineComponentProps> = ({
sourceX,
sourceY,
targetX,
targetY,
}) => {
return (
<g>
<path
fill='none'
stroke='#222'
strokeWidth={1.5}
className='animated'
d={`M${sourceX},${sourceY} C ${sourceX} ${targetY} ${sourceX} ${targetY} ${targetX},${targetY}`}
/>
<circle
cx={targetX}
cy={targetY}
fill='#fff'
r={3}
stroke='#222'
strokeWidth={1.5}
/>
</g>
);
};
export default ConnectionLine;