fix(types): node/edge label type
* add Component to label type
This commit is contained in:
@@ -106,7 +106,7 @@ export interface EdgeProps<Data = ElementData, SourceNodeData = any, TargetNodeD
|
||||
id: string
|
||||
sourceNode: GraphNode<SourceNodeData>
|
||||
targetNode: GraphNode<TargetNodeData>
|
||||
label?: string | VNode
|
||||
label?: string | VNode | Component<EdgeTextProps> | Object
|
||||
type?: string
|
||||
data?: Data
|
||||
style?: CSSProperties
|
||||
@@ -139,7 +139,7 @@ export interface SmoothStepEdgeProps<Data = ElementData, SourceNodeData = any, T
|
||||
id: string
|
||||
sourceNode: GraphNode<SourceNodeData>
|
||||
targetNode: GraphNode<TargetNodeData>
|
||||
label?: string | VNode
|
||||
label?: string | VNode | Component<EdgeTextProps> | Object
|
||||
type?: string
|
||||
data?: Data
|
||||
style?: CSSProperties
|
||||
|
||||
@@ -94,7 +94,7 @@ export interface NodeProps<Data = ElementData> {
|
||||
* For example like this: `h('div', props, children)`)
|
||||
* Object is just a type-hack for Vue, ignore that
|
||||
*/
|
||||
label?: string | VNode | Object
|
||||
label?: string | VNode | Component | Object
|
||||
/** called when used as target for new connection */
|
||||
isValidTargetPos?: ValidConnectionFunc
|
||||
/** called when used as source for new connection */
|
||||
|
||||
Reference in New Issue
Block a user