refactor(types)!: Remove elements prop, change EdgeTypes/NodeTypes prop to string[]
* no more elements prop - v-model instead! * Instead of passing an object map to components just pass in an array of strings as nodeTypes/edgeTypes object * the string name will either be resolved to a dynamic component with :is="type" or a slot with the type-name * update all examples Signed-off-by: Braks <78412429+bcakmakoglu@users.noreply.github.com>
This commit is contained in:
@@ -27,12 +27,8 @@ const buttonStyle: CSSProperties = { position: 'absolute', right: 10, top: 30, z
|
||||
const nodeStyles: CSSProperties = { padding: '10px 15px', border: '1px solid #ddd' }
|
||||
|
||||
const nodeTypesObjects: Record<string, NodeTypes> = {
|
||||
a: {
|
||||
a: NodeA,
|
||||
},
|
||||
b: {
|
||||
b: NodeB,
|
||||
},
|
||||
a: ['a'],
|
||||
b: ['b'],
|
||||
}
|
||||
|
||||
const elements = ref(initialElements)
|
||||
|
||||
Reference in New Issue
Block a user