@rxflow/base
Version:
BaseFlow - 核心 Flow 组件库
21 lines • 808 B
JavaScript
import { Handle } from '@xyflow/react';
import { Position } from '@xyflow/system';
import { useNodeInitialize } from "../..";
import { jsx as _jsx } from "react/jsx-runtime";
import { Fragment as _Fragment } from "react/jsx-runtime";
import { jsxs as _jsxs } from "react/jsx-runtime";
export function OutputNode(_ref) {
var id = _ref.id,
data = _ref.data,
isConnectable = _ref.isConnectable,
_ref$targetPosition = _ref.targetPosition,
targetPosition = _ref$targetPosition === void 0 ? Position.Top : _ref$targetPosition;
useNodeInitialize(id);
return /*#__PURE__*/_jsxs(_Fragment, {
children: [/*#__PURE__*/_jsx(Handle, {
type: "target",
position: targetPosition,
isConnectable: isConnectable
}), data === null || data === void 0 ? void 0 : data.label]
});
}