refactor(app): folder structure, components cleanup

This commit is contained in:
moklick
2019-10-06 19:01:02 +02:00
parent 845bae284f
commit cc2775dd78
25 changed files with 822 additions and 981 deletions
+17
View File
@@ -0,0 +1,17 @@
import React, { memo } from 'react';
export default memo((props) => {
const {
sourceX, sourceY, targetX, targetY, style = {}
} = props;
const yOffset = Math.abs(targetY - sourceY) / 2;
const centerY = targetY < sourceY ? targetY + yOffset : targetY - yOffset;
return (
<path
{...style}
d={`M ${sourceX},${sourceY}L ${sourceX},${centerY}L ${targetX},${centerY}L ${targetX},${targetY}`}
/>
);
});