import { useTheme } from '@/components/theme-provider'; import { IMessageNode } from '@/interfaces/database/flow'; import { Handle, NodeProps, Position } from '@xyflow/react'; import { Flex } from 'antd'; import classNames from 'classnames'; import { get } from 'lodash'; import { LeftHandleStyle, RightHandleStyle } from './handle-icon'; import styles from './index.less'; import NodeHeader from './node-header'; export function MessageNode({ id, data, isConnectable = true, selected, }: NodeProps) { const messages: string[] = get(data, 'form.messages', []); const { theme } = useTheme(); return (
0, })} > {messages.map((message, idx) => { return (
{message}
); })}
); }