simple two node dag

This commit is contained in:
ari committed 2021-11-25 12:00:07 -05:00
1 parent d8747a7ee2
commit 69edca7685
11 files changed
+431 -15

No files matched your search

@@ -0,0 +1,33 @@
import { FC } from "react";
import { useTheme } from "styles/theme";
import { Point } from "types/graphs";
import { AutomationSequenceNode } from '../../types/automations/index';
import { computeNodesEdges } from './location';
export const SequenceNodes: FC<{
startLoc: Point,
sequence: AutomationSequenceNode[],
nodeHeight: number,
nodeWidth: number,
distanceFactor: number,
}> = ({
startLoc,
sequence,
nodeHeight,
nodeWidth,
distanceFactor,
}) => {
const theme = useTheme();
return <>
{Array.from(computeNodesEdges(
startLoc,
nodeWidth,
nodeHeight,
distanceFactor,
sequence,
theme.secondaryAccent,
))}
</>
}