refactor(nodes): Reduce node props

* Reduced node props down to essential and necessary props for custom nodes
This commit is contained in:
Braks
2022-04-04 21:42:48 +02:00
parent cd6b03d4ae
commit 35f3d89240
5 changed files with 50 additions and 56 deletions
+2 -5
View File
@@ -12,14 +12,11 @@ const props = withDefaults(defineProps<NodeProps>(), {
<script lang="ts">
export default {
name: 'InputNode',
inheritAttrs: false,
}
</script>
<template>
<slot v-bind="props">
<component :is="props.label" v-if="typeof props.label !== 'string'" />
<span v-else v-html="props.label"></span>
</slot>
<component :is="props.label.component" v-bind="props.label.props" v-if="typeof props.label !== 'string'" />
<span v-else v-html="props.label" />
<Handle
type="source"
:position="props.sourcePosition"