updated automation metadata
This commit is contained in:
1 parent
54c1edba0c
commit
ccca0edb65
20 files changed
+238
-723
No files matched your search
@@ -0,0 +1,34 @@
|
||||
import { NODE_HEIGHT, NODE_WIDTH } from "./constants"
|
||||
import { Node } from "./types"
|
||||
|
||||
|
||||
|
||||
export interface NodeProp extends Node {
|
||||
height?: number;
|
||||
width?: number;
|
||||
isOpen?: boolean;
|
||||
onXClick?: () => void;
|
||||
onOpenClick?: () => void;
|
||||
}
|
||||
export default ({
|
||||
loc: [x,y],
|
||||
text,
|
||||
height=NODE_HEIGHT,
|
||||
width=NODE_WIDTH,
|
||||
onXClick=() => {},
|
||||
onOpenClick=() => {},
|
||||
isOpen=false,
|
||||
nodeType,
|
||||
}: NodeProp) => <foreignObject x={x} y={y} width={width} height={height}>
|
||||
<div className="automation-dag--node">
|
||||
<div className={`automation-dag--node-inner ${nodeType}`}>
|
||||
<div className="automation-dag--node-inner-edge left" onClick={onXClick}>
|
||||
<div className="automation-node-side-button">X</div>
|
||||
</div>
|
||||
<div className="automation-dag--node-inner-text">{text}</div>
|
||||
<div className="automation-dag--node-inner-edge right" onClick={onOpenClick}>
|
||||
<div className="automation-node-side-button">{isOpen ? "▲" : "▼"}</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</foreignObject>
|
||||
Reference in new issue
Block a user