update(types): Use node/edge component type to define defaults

* import handleprops from types
*

Signed-off-by: Braks <78412429+bcakmakoglu@users.noreply.github.com>
This commit is contained in:
Braks
2021-12-20 19:29:52 +01:00
parent 947baefa02
commit 212c91107f
3 changed files with 18 additions and 20 deletions
+3 -10
View File
@@ -1,21 +1,14 @@
<script lang="ts" setup>
import { useHandle, useVueFlow } from '../../composables'
import { Position, ValidConnectionFunc } from '../../types'
import { Position } from '../../types'
import { NodeId } from '../../context'
interface HandleProps {
id?: string
type?: string
position?: Position
isValidConnection?: ValidConnectionFunc
connectable?: boolean
}
import type { HandleProps } from '../../types/components'
const { id } = useVueFlow()
const props = withDefaults(defineProps<HandleProps>(), {
id: '',
type: 'source',
position: Position.Top,
position: 'top' as Position,
connectable: true,
})