fix!: props and composable not merging together properly

* Add getter for node/edge types
* change nodeTypes prop type to only Record<string, NodeType> - same for edges
* Add rgb example
* remove v-model for elements

Signed-off-by: Braks <78412429+bcakmakoglu@users.noreply.github.com>
This commit is contained in:
Braks
2021-11-19 01:43:07 +01:00
parent c8d3ff6a29
commit 70b077a1f5
12 changed files with 286 additions and 157 deletions
+15
View File
@@ -0,0 +1,15 @@
<script lang="ts" setup>
import { Handle, NodeProps, Position } from '~/index'
interface RBGOutputNodeProps extends NodeProps {
rgb: string
}
const props = defineProps<RBGOutputNodeProps>()
</script>
<template>
<div :style="{ backgroundColor: props.rgb }" class="p-3 rounded-xl text-left text-white">
<div class="text-md uppercase">{{ props.rgb }}</div>
<Handle type="source" :position="Position.Left" />
</div>
</template>