Files
vue-flow/src/components/Nodes/OutputNode.tsx
T
Braks 25c92ecd84 update: Remove wrapEdge and wrapNode files
* implement Edge.tsx and Node.vue to wrap the components accordingly
refactor!: Removing callbacks from props in favor of events
chore: upgrade vue and vite vue plugin
2021-08-08 19:28:45 +02:00

37 lines
899 B
TypeScript

import Handle from '../../components/Handle';
import { NodeProps, Position } from '../../types';
import { defineComponent, PropType } from 'vue';
const OutputNode = defineComponent({
name: 'OutputNode',
components: { Handle },
inheritAttrs: false,
props: {
data: {
type: Object as PropType<NodeProps['data']>,
required: false,
default: undefined as any
},
isConnectable: {
type: Boolean as PropType<NodeProps['isConnectable']>,
required: false,
default: false
},
targetPosition: {
type: String as PropType<NodeProps['targetPosition']>,
required: false,
default: Position.Bottom
}
},
setup(props) {
return () => (
<>
{props.data?.label}
<Handle type="source" position={props.targetPosition} isConnectable={props.isConnectable} />
</>
);
}
});
export default OutputNode;