feat(client): add appropriation node and node edit drawer
This commit is contained in:
56
client/src/components/nodes/AppropriationNode.tsx
Normal file
56
client/src/components/nodes/AppropriationNode.tsx
Normal file
@@ -0,0 +1,56 @@
|
||||
import { Handle, Node, NodeProps, Position } from "@xyflow/react";
|
||||
import DEFAULT_HANDLE_STYLE from "./defaultHandleStyle";
|
||||
|
||||
type AppropriationNodeData = { value: string };
|
||||
|
||||
export default function AppropriationNode({
|
||||
data,
|
||||
}: NodeProps<Node & AppropriationNodeData>) {
|
||||
return (
|
||||
<div
|
||||
style={{
|
||||
border: "0px solid",
|
||||
borderRadius: 8,
|
||||
backgroundColor: "white",
|
||||
width: "248px",
|
||||
}}
|
||||
>
|
||||
<div
|
||||
style={{
|
||||
display: "flex",
|
||||
alignItems: "center",
|
||||
paddingLeft: "12px",
|
||||
height: "48px",
|
||||
fontWeight: "600px",
|
||||
fontSize: "16px",
|
||||
gap: "12px",
|
||||
}}
|
||||
>
|
||||
<img
|
||||
style={{ height: "24px", width: "24px" }}
|
||||
src="/icons/node/calculate.svg"
|
||||
alt="appropriation logo"
|
||||
/>{" "}
|
||||
ПРИСВОЕНИЕ
|
||||
</div>
|
||||
<div style={{ height: "1px", backgroundColor: "#E2E2E2" }}></div>
|
||||
<div
|
||||
style={{
|
||||
display: "flex",
|
||||
alignItems: "center",
|
||||
padding: "12px",
|
||||
fontSize: "14px",
|
||||
minHeight: "48px",
|
||||
}}
|
||||
>
|
||||
{data.value as string}
|
||||
</div>
|
||||
<Handle
|
||||
style={{ ...DEFAULT_HANDLE_STYLE }}
|
||||
type="target"
|
||||
position={Position.Top}
|
||||
id="input"
|
||||
/>
|
||||
</div>
|
||||
);
|
||||
}
|
@@ -69,6 +69,9 @@ export default function IfElseNode({ data }: NodeProps<Node & IfElseNodeData>) {
|
||||
style={{ ...DEFAULT_HANDLE_STYLE }}
|
||||
/>
|
||||
<Handle
|
||||
onClick={() => {
|
||||
console.log("click");
|
||||
}}
|
||||
type="source"
|
||||
position={Position.Bottom}
|
||||
id="false"
|
||||
|
Reference in New Issue
Block a user