@difizen/ai-flow
Version:
Scalable, out-of-the-box, agent-oriented flow
20 lines • 709 B
JavaScript
import { useFlowStore } from "../../stores/flowStore";
import classNames from "../../utils/classnames";
import React from 'react';
import { NodeConfigPanel } from "./nodeConfig";
import { jsx as _jsx } from "react/jsx-runtime";
export var Panel = function Panel(props) {
var nodes = useFlowStore(function (state) {
return state.nodes;
});
var editedNodes = nodes.filter(function (node) {
return node.data.edited;
});
return /*#__PURE__*/_jsx("div", {
tabIndex: -1,
className: classNames('absolute top-14 right-0 bottom-2 flex z-10 outline-none', props.className),
children: editedNodes.length > 0 && /*#__PURE__*/_jsx(NodeConfigPanel, {
node: editedNodes[0]
})
});
};