diff --git a/src/assets/css/style.css b/src/assets/css/style.css index 0dc6ce6..2f8a4e8 100644 --- a/src/assets/css/style.css +++ b/src/assets/css/style.css @@ -432,6 +432,15 @@ foreignObject { cursor: pointer; } +.custom-node .btn-show:hover { + background: #007c89; + border-radius: 50%; + padding-top: 3px; +} +.custom-node .btn-show:hover img { + filter: brightness(0) invert(1); +} + .custom-node .actions { position: absolute; width: 100px; @@ -453,7 +462,8 @@ foreignObject { } .custom-node .actions .btn-remove { - background: #007c89; + background: #f0f0f0; + color: #000; display: block; width: 100%; height: 35px; @@ -462,8 +472,12 @@ foreignObject { text-align: left; padding: 0 10px; } - -.btn-save { +.custom-node .actions .btn-edit:hover, +.custom-node .actions .btn-remove:hover { + background: #007c89; + color: #fff; +} +.btn-save.all { position: absolute; right: 20px; top: 20px; diff --git a/src/index.css b/src/index.css index d63bcfa..aaf7f11 100644 --- a/src/index.css +++ b/src/index.css @@ -27,7 +27,7 @@ body, position: fixed; top: 50%; left: 50%; - width: 1334px; + width: 1000px; background: #fff; z-index: 1000; transform: translate(-50%, -50%); @@ -42,7 +42,7 @@ body, padding: 40px; border-radius: 5px; overflow-y: auto; - max-height: 600px; + max-height: 500px; } .popup-close { diff --git a/src/nodes/NodeFlow.tsx b/src/nodes/NodeFlow.tsx index 79b7961..5a0d86c 100644 --- a/src/nodes/NodeFlow.tsx +++ b/src/nodes/NodeFlow.tsx @@ -7,7 +7,6 @@ import { BackgroundVariant, MarkerType, useReactFlow, - ReactFlowProvider, useNodesState, useEdgesState, useStoreApi, @@ -29,6 +28,18 @@ const nodeContents = { `, + 'send-sms': ` + + + + + `, + 'send-slack': ` + + + + + `, 'customer-sign': ` @@ -60,7 +71,7 @@ const NodeFlow = ({ initialNodes, initialEdges }) => { const [showTabBar, setShowTabBar] = useState(false); const [lastNodeId, setLastNodeId] = useState(nodes[0].id); const [showPopup, setShowPopup] = useState(false); - const [selectedNodeContent, setSelectedNodeContent] = useState(''); + const [selectedNodeContent, setSelectedNodeContent] = useState(''); const [addNodeCallback, setAddNodeCallback] = useState(() => () => {}); const [isTabbarVisible, setIsTabbarVisible] = useState(false); const { screenToFlowPosition } = useReactFlow(); @@ -290,12 +301,14 @@ const NodeFlow = ({ initialNodes, initialEdges }) => { const newNodeId = nanoid(8); const addNodeId = '2'; + const addNodeKey = 'add-node'; const addNode = nodes.find((node) => node.id === addNodeId); const targetEdge = edges.find( (edge) => edge?.source === '2' || edge?.target === '2' ); const targetNodeId = targetEdge?.source === '2' ? targetEdge?.target : targetEdge?.source; + const targetNode = nodes.find((node) => node.id === targetNodeId); const newNodePosition = targetNode @@ -336,7 +349,7 @@ const NodeFlow = ({ initialNodes, initialEdges }) => {